<template>
  <!-- 驾驶员审核 -->
  <div class="search">
    <Card>
      <Row @keydown.enter.native="handleSearch">
        <Form
          ref="searchForm"
          :model="searchForm"
          inline
          :label-width="70"
          class="search-form"
        >
          <FormItem label="登录账号" prop="mobile">
            <Input
              type="text"
              v-model="searchForm.mobile"
              placeholder="请输入手机号"
              clearable
              style="width: 180px"
            />
          </FormItem>
          <FormItem label="用户姓名" prop="name">
            <Input
              type="text"
              v-model="searchForm.name"
              placeholder="请输入用户姓名"
              clearable
              style="width: 180px"
            />
          </FormItem>
          <!-- <FormItem label="驾驶车辆" prop="vehicleNum">
            <Input
              type="text"
              v-model="searchForm.vehicleNum"
              placeholder="请输入驾驶车辆"
              clearable
              style="width: 180px"
            />
          </FormItem> -->
          <FormItem label="认证类型">
            <Select v-model="searchForm.actualCarrierStatus" style="width: 180px">
              <Option value="">全部</Option>
              <Option value="0">未认证</Option>
              <Option value="1">已认证</Option>
              <Option value="3">已过期</Option>
            </Select>
          </FormItem>
          <span style="margin-left: 35px" class="br">
            <Button @click="handleSearch" type="primary" icon="ios-search"
              >搜索</Button
            >
            <Button @click="handleReset">重置</Button>
            <Button @click="getDataList" icon="md-refresh">刷新</Button>
            <Button @click="newDrier" type="primary" icon="md-add"
              >新增用户</Button
            >
            <Button @click="exportSelectData" icon="md-cloud-upload"
              >导出所选数据</Button
            >
          </span>
        </Form>
      </Row>
      <!--  -->
      <Row>
        <Table
          :loading="loading"
          border
          :columns="columns"
          :data="data"
          ref="table"
          sortable="custom"
          @on-sort-change="changeSort"
          @on-selection-change="changeSelect"
        ></Table>
      </Row>
      <Row type="flex" justify="end" class="page">
        <Page
          :current="searchForm.pageNumber"
          :total="total"
          :page-size="searchForm.pageSize"
          @on-change="changePage"
          @on-page-size-change="changePageSize"
          :page-size-opts="[10, 20, 50]"
          size="small"
          show-total
          show-elevator
          show-sizer
        ></Page>
      </Row>

      <!-- 自定义导出数据 -->
      <Modal
        v-model="exportModalVisible"
        :title="exportTitle"
        :loading="loadingExport"
        @on-ok="exportCustomData"
      >
        <Form ref="exportForm" :label-width="100">
          <FormItem label="导出文件名">
            <Input v-model="filename" />
          </FormItem>
          <FormItem label="自定义导出列">
            <CheckboxGroup v-model="chooseColumns">
              <Checkbox
                v-for="(item, i) in exportColumns"
                :label="item.title"
                :key="i"
                :value="item.checked"
                :disabled="item.disabled"
              ></Checkbox>
            </CheckboxGroup>
          </FormItem>
          <FormItem label="备注">
            <Input
              v-model="exportRemarks"
              placeholder="备注"
              style="width: 300px"
            />
          </FormItem>
        </Form>
      </Modal>
    </Card>

    <Drawer
      :title="authenticationTilel"
      :mask-closable="false"
      v-model="driverVisible"
      width="710"
    >
      <div class="demo-spin-article">
        <Tabs @on-click="driverTabs" v-model="driverTabPane">
          <TabPane v-if="ownerInformation" label="车主信息" name="name4">
            <div style="width: 100%; height: 15px"></div>
            <div></div>
            <div>
              <Form
                :model="driverData1"
                :label-width="165"
                :rules="RealAuthentication1"
                ref="driverData1"
                inline
              >
                <FormItem
                  label="姓名"
                  style="margin-left: -110px"
                  prop="ownerName"
                >
                  <Input
                    style="width: 270px"
                    placeholder="请输入车主真实姓名"
                    v-model="driverData1.ownerName"
                    clearable
                  />
                </FormItem>
                <FormItem
                  label="身份证号"
                  style="margin-left: -70px"
                  prop="ownerNum"
                >
                  <Input
                    style="width: 220px"
                    placeholder="请输入车主身份证号"
                    v-model="driverData1.ownerNum"
                    clearable
                  />
                </FormItem>
                <FormItem
                  label="身份证有效结束日期"
                  style="margin-left: -13px"
                  prop="ownerEndDate"
                >
                  <DatePicker
                    type="date"
                    style="width: 170px"
                    format="yyyyMMdd"
                    placeholder="请选择身份证有效期"
                    :value="driverData1.ownerEndDate"
                    @on-change="driverDataOwnerEndDate"
                  ></DatePicker>
                </FormItem>
                <FormItem
                  label="联系电话"
                  style="margin-left: -68px"
                  prop="contactPhone"
                >
                  <Input
                    style="width: 220px"
                    placeholder="请输入车主联系电话"
                    v-model="driverData1.contactPhone"
                    clearable
                  />
                </FormItem>

                <div>
                  <FormItem
                    label="银行卡开户行"
                    style="margin-left: -55px"
                    prop="cardName"
                  >
                    <Select
                      clearable
                      @on-select="bankCardSelects"
                      placeholder="请选择银行卡开户行"
                      v-model="driverData1.cardName"
                     style="width: 215px"
                    >
                      <Option
                        v-for="(li, index) in bankCardList"
                        :key="index"
                        :value="li.value"
                        >{{ li.label }}</Option
                      >
                    </Select>
                  </FormItem>
                    <FormItem
                    label="车主银行卡号"
                    style="margin-left: -40px"
                    prop="cardNumber"
                  >
                    <Input
                      style="width: 190px"
                      placeholder="请输入车主银行卡号"
                      v-model="driverData1.cardNumber"
                      clearable
                    />
                  </FormItem>
                  <FormItem
                    label="预留手机号"
                    style="margin-left: -68px"
                    prop="phone"
                  >
                    <Input
                      style="width: 230px"
                      placeholder="请输入车主银行卡预留手机号"
                      v-model="driverData1.phone"
                      clearable
                    />
                  </FormItem>
                </div>
                <div style="display: flex; margin-left: 2px">
                  <div>
                    <FormItem
                      label="挂靠运输公司名称"
                      style="margin-left: -28px"
                      prop="affiliatedCompanyName"
                    >
                      <Input
                        style="width: 190px"
                        placeholder="请输入挂靠运输公司名称"
                        v-model="driverData1.affiliatedCompanyName"
                        clearable
                      />
                    </FormItem>
                  </div>
                  <div>
                    <div>
                      <FormItem
                        style="margin-left: 7px"
                        label="道路运输经营许可证号"
                        prop="roadPermitNo"
                      >
                        <Input
                          style="width: 140px"
                          placeholder="请输入经营许可证号"
                          v-model="driverData1.roadPermitNo"
                          clearable
                        />
                      </FormItem>
                    </div>
                  </div>
                </div>
                <div>
               <div>
                    <FormItem
                      label="经营许可证有效期"
                      style="margin-left: -25px"
                      prop="roadPermitNoDate"
                    >
                      <DatePicker
                        type="date"
                        style="width: 190px"
                        format="yyyyMMdd"
                        placeholder="请选择经营许可证有效期"
                        :value="driverData1.roadPermitNoDate"
                        @on-change="roadPermitNoDateDate"
                      ></DatePicker>
                    </FormItem>
                  </div>
                </div>
                <Row style="margin-left: 8px">
                  <Col span="8">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="ownerCardFontPicFileId != ''"
                        style="width: 58px"
                        height="100px"
                        :src="ownerCardFontPicFileId"
                      />
                      <img
                        v-else
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/owner1.png"
                      />
                      <div
                        v-if="ownerCardFontPicFileId != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(ownerCardFontPicFileId)"
                        ></Icon>
                      </div>
                    </div>
                    <Upload
                      v-if="driverShowImg"
                      :on-progress="ownerProgressFont"
                      :beforeUpload="beforeUpload"
                      ref="fontUpload"
                      :show-upload-list="false"
                      :on-success="ownerFontHandleSuccess"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      :headers="header"
                      :data="{
                        fileType: 'IDCARD_FONT_PIC',
                        userId: form.userId,
                      }"
                      type="drag"
                      :action="uploadIdCardPic"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-drivre">
                      <template>
                        <Progress
                          v-if="ownerProgressFontShow"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 8px" class="check">
                      <span class="check_font">车主身份证正面</span>
                    </div>
                  </Col>
                  <Col span="8">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="ownerCardBackPicFileId != ''"
                        style="width: 58px"
                        height="100px"
                        :src="ownerCardBackPicFileId"
                      />
                      <img
                        v-else
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/owner2.png"
                      />
                      <div
                        v-if="ownerCardBackPicFileId != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(ownerCardBackPicFileId)"
                        ></Icon>
                      </div>
                    </div>
                    <div slot="label" class="check">身份证背面</div>
                    <Upload
                      v-if="driverShowImg"
                      :on-progress="ownerProgressBack"
                      :beforeUpload="beforeUpload"
                      ref="backUpload"
                      :show-upload-list="false"
                      :on-success="ownerBackHandleSuccess"
                      :before-upload="handleBeforeUpload"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      type="drag"
                      :default-file-list="idCardBackPicFileList"
                      :headers="header"
                      :data="{
                        fileType: 'IDCARD_BACK_PIC',
                        userId: form.userId,
                      }"
                      :action="uploadIdCardPic"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-drivre">
                      <template>
                        <Progress
                          v-if="owneroBackShow"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 8px" class="check">
                      <span class="check_font">车主身份证背面 </span>
                    </div>
                  </Col>

                  <Col span="8">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="bankCard != ''"
                        style="width: 58px"
                        height="100px"
                        :src="bankCard"
                      />
                      <img
                        v-else
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/new2.png"
                      />
                      <div
                        v-if="bankCard != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(bankCard)"
                        ></Icon>
                      </div>
                    </div>
                    <Upload
                      v-if="driverShowImg"
                      :on-progress="bankCardideIDCard"
                      :beforeUpload="beforeUpload"
                      ref="backUpload"
                      :show-upload-list="false"
                      :on-success="bankCardideSuccess"
                      :before-upload="handleBeforeUpload"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      type="drag"
                      :default-file-list="idCardBackPicFileList"
                      :headers="header"
                      :data="{
                        fileType: 'BANK_PIC',
                        userId: form.userId,
                      }"
                      :action="uploadBankCardPic"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-drivre">
                      <template>
                        <Progress
                          v-if="bankCardideIDCardShow"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 8px" class="check">
                      <span class="check_font">车主银行卡照片 </span>
                    </div>
                  </Col>
                  <Col span="8" style="margin-top: 30px">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="affiliationAgreement != ''"
                        style="width: 58px"
                        height="100px"
                        :src="affiliationAgreement"
                      />
                      <img
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/owner7.png"
                      />
                      <div
                        v-if="affiliationAgreement != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(affiliationAgreement)"
                        ></Icon>
                      </div>
                    </div>
                    <Upload
                      v-if="driverShowImg"
                      :on-progress="affiliationProgress"
                      :beforeUpload="beforeUpload"
                      ref="companyUpload"
                      :show-upload-list="false"
                      :on-success="affiliationSuccess"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      :headers="header"
                      type="drag"
                      :data="{
                        fileType: 'AFFILIATION_AGREEMENT',
                        userId: form.userId,
                      }"
                      :action="uploadHeadPortrait"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-compny">
                      <template>
                        <Progress
                          v-if="affiliationLicensetrue"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 15px" class="check">
                      <span class="check_font">车辆挂靠协议</span>
                    </div>
                  </Col>
                </Row>
                <!-- <div class="switchDriver">
                  <span>
                    <el-switch
                      v-model="ownerDriveCar"
                      active-color="#13ce66"
                      inactive-color="#eee"
                      @change="changeDriveCar"
                    >
                    </el-switch>
                  </span>
                  <span> 是否也要开车</span>
                </div> -->
                <Row>
                  <Col>
                    <Button
                      v-if="driverShowImg"
                      style="margin-top: 22px"
                      type="warning"
                      :loading="loadinWorkLicenseInfo"
                      @click="driverCertification"
                      >保存资料</Button
                    >
                  </Col>
                </Row>
              </Form>
            </div>
          </TabPane>
          <TabPane v-if="selmployedInformation" label="个体户信息" name="name5">
         <div style="width: 100%; height: 15px"></div>
            <div>
              <Form
                :model="driverData5"
                :rules="RealAuthentication5"
                ref="driverData5"
                :label-width="165"
                inline
              >
                <FormItem
                  label="个体户名称"
                  prop="affiliatedCompanyName"
                  style="margin-left: -71px"
                >
                  <Input
                    style="width: 230px"
                    placeholder="请输入个体户名称"
                    v-model="driverData5.affiliatedCompanyName"
                    clearable
                  />
                </FormItem>

                <FormItem
                  label="统一社会信用代码"
                  prop="affiliatedCompanyCode"
                  style="margin-left: -20px"
                >
                  <Input
                    style="width: 160px"
                    placeholder="请输入统一社会信用代码"
                    v-model="driverData5.affiliatedCompanyCode"
                    clearable
                  />
                </FormItem>

                <FormItem
                  label="经营者名称"
                  prop="ownerName"
                  style="margin-left: -71px"
                >
                  <Input
                    style="width: 225px"
                    placeholder="请输入经营者名称"
                    v-model="driverData5.ownerName"
                    clearable
                  />
                </FormItem>
                <FormItem
                  label="经营者身份证号"
                  prop="ownerNum"
                  style="margin-left: -30px"
                >
                  <Input
                    style="width: 175px"
                    placeholder="请输入经营者身份证号"
                    v-model="driverData5.ownerNum"
                    clearable
                  />
                </FormItem>
                <!-- <FormItem
                  label="身份证有效结束日期"
                  prop="ownerEndDate"
                  style="margin-left: -13px"
                >
                  <DatePicker
                    type="date"
                    style="width: 170px"
                    format="yyyyMMdd"
                    placeholder="请输入身份证有效结束日期"
                    :value="driverData5.ownerEndDate"
                    @on-change="ownerEndDateDate5"
                  ></DatePicker>
                </FormItem> -->
                <FormItem
                  label="联系电话"
                  prop="contactPhone"
                  style="margin-left: -75px"
                >
                  <Input
                    style="width: 220px"
                    placeholder="请输入联系电话"
                    v-model="driverData5.contactPhone"
                    clearable
                  />
                </FormItem>
                <div>
                  <FormItem
                    label="个体对公开户行"
                    prop="cardName"
                    style="margin-left: -40px"
                  >
                    <!-- <Input
                      style="width: 200px"
                      placeholder="请输入个体对公开户行"
                      v-model="driverData5.cardName"
                      clearable
                    /> -->
                    <Select
                      clearable
                      @on-select="bankCardSelect"
                      placeholder="请选择银行卡开户行"
                      v-model="driverData5.cardName"
                      style="width: 200px"
                    >
                      <Option
                        v-for="(li, index) in bankCardList"
                        :key="index"
                        :value="li.value"
                        >{{ li.label }}</Option
                      >
                    </Select>
                  </FormItem>
                  <FormItem
                    label="个体对公账号"
                    prop="cardNumber"
                    style="margin-left: -50px"
                  >
                    <Input
                      style="width: 190px"
                      placeholder="请输入个体对公账号"
                      v-model="driverData5.cardNumber"
                      clearable
                    />
                  </FormItem>
                </div>
                <div style="display: flex; margin-left: -2px">
                  <div>
                    <FormItem label="道路运输经营许可证号" prop="roadPermitNo">
                      <Input
                        style="width: 165px"
                        placeholder="请输入经营许可证号"
                        v-model="driverData5.roadPermitNo"
                        clearable
                      />
                    </FormItem>
                  </div>
                  <div>
                    <!-- <FormItem
                      label="经营许可证有效期至"
                      prop="roadPermitNoDate"
                      style="margin-left: -10px"
                    >
                      <DatePicker
                        type="date"
                        style="width: 145px"
                        format="yyyyMMdd"
                        placeholder="请选择经营许可证有效期至"
                        :value="driverData5.roadPermitNoDate"
                        @on-change="roadPermitNoDateDate5"
                      ></DatePicker>
                    </FormItem> -->
                  </div>
                </div>

                <Row style="margin-left: 8px">
                  <Col span="8">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="frontOperatorIDCard != ''"
                        style="width: 58px"
                        height="100px"
                        :src="frontOperatorIDCard"
                      />
                      <img
                        v-else
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/owner1.png"
                      />
                      <div
                        v-if="frontOperatorIDCard != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(frontOperatorIDCard)"
                        ></Icon>
                      </div>
                    </div>
                    <Upload
                      v-if="driverShowImg"
                      :on-progress="frontProgressFont"
                      :beforeUpload="beforeUpload"
                      ref="fontUpload"
                      :show-upload-list="false"
                      :on-success="frontFontHandleSuccess"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      :headers="header"
                      :data="{
                        fileType: 'IDCARD_FONT_PIC',
                        userId: form.userId,
                      }"
                      type="drag"
                      :action="uploadIdCardPic"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-drivre">
                      <template>
                        <Progress
                          v-if="frontProgressFontShow"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 8px" class="check">
                      <span class="check_font">经营者身份证正面</span>
                    </div>
                  </Col>
                  <Col span="8">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="frontBackPicFileId != ''"
                        style="width: 58px"
                        height="100px"
                        :src="frontBackPicFileId"
                      />
                      <img
                        v-else
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/owner2.png"
                      />
                      <div
                        v-if="frontBackPicFileId != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(frontBackPicFileId)"
                        ></Icon>
                      </div>
                    </div>
                    <div slot="label" class="check">身份证背面</div>
                    <Upload
                      v-if="driverShowImg"
                      :on-progress="frontBackProgress"
                      :beforeUpload="beforeUpload"
                      ref="backUpload"
                      :show-upload-list="false"
                      :on-success="frontBackHandleSuccess"
                      :before-upload="handleBeforeUpload"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      type="drag"
                      :default-file-list="idCardBackPicFileList"
                      :headers="header"
                      :data="{
                        fileType: 'IDCARD_BACK_PIC',
                        userId: form.userId,
                      }"
                      :action="uploadIdCardPic"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-drivre">
                      <template>
                        <Progress
                          v-if="frontBackShow"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 8px" class="check">
                      <span class="check_font">经营者身份证背面 </span>
                    </div>
                  </Col>

                  <Col span="8" style="margin-top: 0px">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="frontbusinessLicense != ''"
                        style="width: 58px"
                        height="100px"
                        :src="frontbusinessLicense"
                      />
                      <img
                        v-else
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/owner2.png"
                      />
                      <div
                        v-if="frontbusinessLicense != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(frontbusinessLicense)"
                        ></Icon>
                      </div>
                    </div>

                    <Upload
                      v-if="driverShowImg"
                      :on-progress="frontbusinessProgress"
                      :beforeUpload="beforeUpload"
                      ref="backUpload"
                      :show-upload-list="false"
                      :on-success="frontbusinessSuccess"
                      :before-upload="handleBeforeUpload"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      type="drag"
                      :default-file-list="idCardBackPicFileList"
                      :headers="header"
                      :action="upLoadCompanyLicense"
                      :data="{
                        fileType: 'IDCARD_FONT_PIC',
                        userId: form.userId,
                      }"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-drivre">
                      <template>
                        <Progress
                          v-if="frontbusinessProgressShow"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 8px" class="check">
                      <span class="check_font">营业执照</span>
                    </div>
                  </Col>

                  <Col span="8" style="margin-top: 15px">
                    <div class="demo-upload-list-driver">
                      <img
                        v-if="xukezhengPicFileUrl != ''"
                        style="width: 58px"
                        height="100px"
                        :src="xukezhengPicFileUrl"
                      />
                      <img
                        style="width: 58px"
                        height="100px"
                        src="@/assets/vehicleAtes/vehicle10.png"
                      />
                      <div
                        v-if="xukezhengPicFileUrl != ''"
                        class="demo-upload-list-driver-cover"
                      >
                        <Icon
                          type="ios-eye-outline"
                          @click.native="showPic(xukezhengPicFileUrl)"
                        ></Icon>
                      </div>
                    </div>
                    <Upload
                      v-if="driverShowImg"
                      :on-progress="BusineLicense"
                      :beforeUpload="beforeUpload"
                      ref="companyUpload"
                      :show-upload-list="false"
                      :on-success="xukezhengHandleSuccess"
                      :format="['jpg', 'jpeg', 'png']"
                      :on-format-error="handleFormatError"
                      :headers="header"
                      :data="{
                        fileType: 'ROAD_OPERATION_PERMIT',
                        userId: form.userId,
                      }"
                      type="drag"
                      :action="uploadVehiclePic"
                      style="display: inline-block; width: 30px"
                    >
                      <div style="width: 30px; height: 30px; line-height: 30px">
                        <Icon type="ios-camera" size="20"></Icon>
                      </div>
                    </Upload>
                    <div class="demo-uploadcss-compny">
                      <template>
                        <Progress
                          v-if="BusineLicensetrue"
                          text-inside
                          :percent="load"
                          :stroke-width="3"
                        ></Progress>
                      </template>
                    </div>
                    <div style="margin-top: 15px" class="check">
                      <span class="check_font">道路运输经营许可证照片</span>
                    </div>
                  </Col>
                </Row>
                <!-- <div class="switchDriver">
                  <span>
                    <el-switch
                      v-model="personDriveCar"
                      active-color="#13ce66"
                      inactive-color="#eee"
                      @change="changepersonDriveCar"
                    >
                    </el-switch>
                  </span>
                  <span> 是否也要开车</span>
                </div> -->
                <Row>
                  <Col>
                    <Button
                      v-if="driverShowImg"
                      style="margin-top: 22px"
                      type="warning"
                      :loading="loadinWorkLicenseInfo"
                      @click="driverCertification"
                      >保存资料</Button
                    >
                  </Col>
                </Row>
              </Form>
            </div>
          </TabPane>



          <TabPane v-if="basicInformation" label="身份证" name="name1">
            <div style="width: 100%; height: 15px"></div>
            <Form
              :model="driverData"
              :rules="RealAuthentication"
              ref="driverData"
              :label-width="150"
              inline
            >
              <div style="display: flex">
                <div style="margin-left: -100px">
                  <FormItem label="姓名" prop="name">
                    <Input
                      style="width: 275px"
                      placeholder="请输入姓名"
                      v-model="driverData.name"
                      clearable
                    />
                  </FormItem>
                </div>
                <div>
                  <FormItem
                    style="margin-left: -60px"
                    label="身份证号"
                    prop="num"
                  >
                    <Input
                      style="width: 220px"
                      placeholder="请输入身份证号"
                      v-model="driverData.num"
                      clearable
                    />
                  </FormItem>
                </div>
              </div>

              <FormItem
                style="margin-left: -70px"
                label="出生日期"
                prop="birth"
              >
                <DatePicker
                  type="date"
                  style="width: 245px"
                  format="yyyyMMdd"
                  placeholder="请选择出生日期"
                  :value="driverData.birth"
                  @on-change="driverDataBirth"
                ></DatePicker>
              </FormItem>
              <FormItem label="性别" prop="sex" style="margin-left: -88px">
                <Input
                  style="width: 250px"
                  placeholder="请输入性别"
                  v-model="driverData.sex"
                  clearable
                />
              </FormItem>
              <FormItem label="身份证有效开始日期" prop="startDate">
                <DatePicker
                  type="date"
                  style="width: 175px"
                  format="yyyyMMdd"
                  placeholder="请选择身份证有效开始日期"
                  :value="driverData.startDate"
                  @on-change="driverDataStartDate"
                ></DatePicker>
              </FormItem>
              <FormItem
                style="margin-left: 10px"
                label="身份证有效结束日期"
                prop="endDate"
              >
                <DatePicker
                  type="date"
                  style="width: 155px"
                  format="yyyyMMdd"
                  placeholder="请选择身份证有效结束日期"
                  :value="driverData.endDate"
                  @on-change="driverDataEndDate"
                ></DatePicker>
              </FormItem>

              <Row style="margin-left: 8px">
                <Col span="8">
                  <div class="demo-upload-list-driver">
                    <img
                      v-if="idCardFontPicFileUrl != ''"
                      style="width: 58px"
                      height="100px"
                      :src="idCardFontPicFileUrl"
                    />
                    <img
                      v-else
                      style="width: 58px"
                      height="100px"
                      src="@/assets/vehicleAtes/owner1.png"
                    />
                    <div
                      v-if="idCardFontPicFileUrl != ''"
                      class="demo-upload-list-driver-cover"
                    >
                      <Icon
                        type="ios-eye-outline"
                        @click.native="showPic(idCardFontPicFileUrl)"
                      ></Icon>
                    </div>
                  </div>
                  <Upload
                    v-if="driverShowImg"
                    :on-progress="FrontIDCard"
                    :beforeUpload="beforeUpload"
                    ref="fontUpload"
                    :show-upload-list="false"
                    :on-success="cardFontHandleSuccess"
                    :format="['jpg', 'jpeg', 'png']"
                    :on-format-error="handleFormatError"
                    :headers="header"
                    :data="{
                      fileType: 'IDCARD_FONT_PIC',
                      userId: form.userId,
                    }"
                    type="drag"
                    :action="uploadIdCardPic"
                    style="display: inline-block; width: 30px"
                  >
                    <div style="width: 30px; height: 30px; line-height: 30px">
                      <Icon type="ios-camera" size="20"></Icon>
                    </div>
                  </Upload>
                  <div class="demo-uploadcss-drivre">
                    <template>
                      <Progress
                        v-if="FrontIDCardTrue"
                        text-inside
                        :percent="load"
                        :stroke-width="3"
                      ></Progress>
                    </template>
                  </div>
                  <div style="margin-top: 8px" class="check">
                    <span class="check_font">身份证正面</span>
                  </div>
                </Col>
                <Col span="8">
                  <div class="demo-upload-list-driver">
                    <img
                      v-if="idCardBackPicFileUrl != ''"
                      style="width: 58px"
                      height="100px"
                      :src="idCardBackPicFileUrl"
                    />
                    <img
                      v-else
                      style="width: 58px"
                      height="100px"
                      src="@/assets/vehicleAtes/owner2.png"
                    />
                    <div
                      v-if="idCardBackPicFileUrl != ''"
                      class="demo-upload-list-driver-cover"
                    >
                      <Icon
                        type="ios-eye-outline"
                        @click.native="showPic(idCardBackPicFileUrl)"
                      ></Icon>
                    </div>
                  </div>
                  <div slot="label" class="check">身份证背面</div>
                  <Upload
                    v-if="driverShowImg"
                    :on-progress="ReverseSideIDCard"
                    :beforeUpload="beforeUpload"
                    ref="backUpload"
                    :show-upload-list="false"
                    :on-success="cardBackHandleSuccess"
                    :before-upload="handleBeforeUpload"
                    :format="['jpg', 'jpeg', 'png']"
                    :on-format-error="handleFormatError"
                    type="drag"
                    :default-file-list="idCardBackPicFileList"
                    :headers="header"
                    :data="{
                      fileType: 'IDCARD_BACK_PIC',
                      userId: form.userId,
                    }"
                    :action="uploadIdCardPic"
                    style="display: inline-block; width: 30px"
                  >
                    <div style="width: 30px; height: 30px; line-height: 30px">
                      <Icon type="ios-camera" size="20"></Icon>
                    </div>
                  </Upload>
                  <div class="demo-uploadcss-drivre">
                    <template>
                      <Progress
                        v-if="ReverseSideIDCardTrue"
                        text-inside
                        :percent="load"
                        :stroke-width="3"
                      ></Progress>
                    </template>
                  </div>
                  <div style="margin-top: 8px" class="check">
                    <span class="check_font">身份证背面 </span>
                  </div>
                </Col>
              </Row>
            </Form>
          </TabPane>
          <TabPane v-if="basicInformation" label="驾驶证" name="name2">
            <div style="width: 100%; height: 15px"></div>
            <Form
              :model="driverData2"
              :rules="RealAuthentication2"
              ref="driverData2"
              :label-width="150"
              inline
            >
              <div style="display: flex">
                <div style="margin-left: -55px">
                  <FormItem label="驾驶证编号" prop="licenseNum">
                    <Input
                      style="width: 230px"
                      placeholder="请输入驾驶证编号"
                      v-model="driverData2.licenseNum"
                      clearable
                    />
                  </FormItem>
                </div>
                <div>
                  <FormItem
                    style="margin-left: -25px"
                    label="驾驶证发证机关"
                    prop="issuingOrganizations"
                  >
                    <Input
                      style="width: 200px"
                      placeholder="请输入驾驶证发证机关"
                      v-model="driverData2.issuingOrganizations"
                      clearable
                    />
                  </FormItem>
                </div>
              </div>
              <FormItem
                style="margin-left: -40px"
                label="初次领证日期"
                prop="issueDate"
              >
                <DatePicker
                  type="date"
                  style="width: 215px"
                  format="yyyyMMdd"
                  placeholder="请选择初次领证日期"
                  :value="driverData2.issueDate"
                  @on-change="driverDataIssueDate"
                ></DatePicker>
              </FormItem>
              <FormItem
                style="margin-left: -65px"
                label="准驾车型"
                prop="driverType"
              >
                <Input
                  style="width: 240px"
                  placeholder="请输入准驾车型"
                  v-model="driverData2.driverType"
                  clearable
                />
              </FormItem>

              <FormItem label="驾驶证有效开始日期" prop="licenseStartDate">
                <DatePicker
                  type="date"
                  style="width: 175px"
                  format="yyyyMMdd"
                  placeholder="请选择驾驶证有效开始日期"
                  :value="driverData2.licenseStartDate"
                  @on-change="driverDatalicenseStartDate"
                ></DatePicker>
              </FormItem>
              <FormItem
                style="margin-left: 5px"
                label="驾驶证有效结束日期"
                prop="licenseEndDate"
              >
                <DatePicker
                  type="date"
                  style="width: 170px"
                  format="yyyyMMdd"
                  placeholder="请选择驾驶证有效结束日期"
                  :value="driverData2.licenseEndDate"
                  @on-change="driverDatalicenseEndDate"
                ></DatePicker>
              </FormItem>

              <FormItem
                style="margin-left: -28px"
                label="驾驶证年检日期"
                prop="yearlyInspectionDate"
              >
                <DatePicker
                  type="date"
                  style="width: 205px"
                  format="yyyyMMdd"
                  placeholder="请选择驾驶证年检日期"
                  :value="driverData2.yearlyInspectionDate"
                  @on-change="yearlyInspectionDateEndDate"
                ></DatePicker>
              </FormItem>

              <Row style="margin-left: 10px">
                <Col span="8">
                  <div class="demo-upload-list-driver">
                    <img
                      v-if="driverFontPicFileUrl != ''"
                      style="width: 58px"
                      height="100px"
                      :src="driverFontPicFileUrl"
                    />
                    <img
                      v-else
                      style="width: 58px"
                      height="100px"
                      src="@/assets/vehicleAtes/drier3.png"
                    />
                    <div
                      v-if="driverFontPicFileUrl != ''"
                      class="demo-upload-list-driver-cover"
                    >
                      <Icon
                        type="ios-eye-outline"
                        @click.native="showPic(driverFontPicFileUrl)"
                      ></Icon>
                    </div>
                  </div>

                  <Upload
                    v-if="driverShowImg"
                    :on-progress="DriverLicense"
                    :beforeUpload="beforeUpload"
                    ref="fontUpload"
                    :show-upload-list="false"
                    :on-success="driverFontHandleSuccess"
                    :format="['jpg', 'jpeg', 'png']"
                    :on-format-error="handleFormatError"
                    :headers="header"
                    :data="{
                      fileType: 'DRIVER_FONT_PIC',
                      userId: form.userId,
                    }"
                    type="drag"
                    :action="upLoadDriverLicense"
                    style="display: inline-block; width: 30px"
                  >
                    <div style="width: 30px; height: 30px; line-height: 30px">
                      <Icon type="ios-camera" size="20"></Icon>
                    </div>
                  </Upload>
                  <div class="demo-uploadcss-drivre">
                    <template>
                      <Progress
                        v-if="DriverLicenseTrue"
                        text-inside
                        :percent="load"
                        :stroke-width="3"
                      ></Progress>
                    </template>
                  </div>

                  <div style="margin-top: 8px" class="check">
                    <span class="check_font">驾照主页</span>
                  </div>
                </Col>
                <Col span="8" push="1">
                  <div class="demo-upload-list-driver">
                    <img
                      v-if="driverBackPicFileUrl != ''"
                      style="width: 58px"
                      height="100px"
                      :src="driverBackPicFileUrl"
                    />
                    <img
                      v-else
                      style="width: 58px"
                      height="100px"
                      src="@/assets/vehicleAtes/drier4.png"
                    />
                    <div
                      v-if="driverBackPicFileUrl != ''"
                      class="demo-upload-list-driver-cover"
                    >
                      <Icon
                        type="ios-eye-outline"
                        @click.native="showPic(driverBackPicFileUrl)"
                      ></Icon>
                    </div>
                  </div>
                  <Upload
                    v-if="driverShowImg"
                    :on-progress="DriverLicenPage"
                    :beforeUpload="beforeUpload"
                    ref="backUpload"
                    :show-upload-list="false"
                    :on-success="driverBackHandleSuccess"
                    :before-upload="handleBeforeUpload"
                    :format="['jpg', 'jpeg', 'png']"
                    :on-format-error="handleFormatError"
                    type="drag"
                    :default-file-list="idCardBackPicFileList"
                    :headers="header"
                    :data="{
                      fileType: 'DRIVER_BACK_PIC',
                      userId: form.userId,
                    }"
                    :action="upLoadDriverLicense"
                    style="display: inline-block; width: 30px"
                  >
                    <div style="width: 30px; height: 30px; line-height: 30px">
                      <Icon type="ios-camera" size="20"></Icon>
                    </div>
                  </Upload>
                  <div class="demo-uploadcss-drivre">
                    <template>
                      <Progress
                        v-if="DriverLicenPageTrue"
                        text-inside
                        :percent="load"
                        :stroke-width="3"
                      ></Progress>
                    </template>
                  </div>
                  <div style="margin-top: 8px" class="check">
                    <span class="check_font">驾照副页</span>
                  </div>
                </Col>
              </Row>
            </Form>
          </TabPane>
          <TabPane v-if="basicInformation" label="从业资格证" name="name3">
            <div style="width: 100%; height: 15px"></div>
            <Form
              :model="driverData3"
              :rules="RealAuthentication3"
              ref="driverData3"
              :label-width="125"
              inline
            >
              <FormItem
                style="margin-left: -15px"
                label="从业资格证号"
                prop="workLicenseNo"
              >
                <Input
                  style="width: 190px"
                  placeholder="请输入从业资格证号"
                  v-model="driverData3.workLicenseNo"
                  clearable
                />
              </FormItem>
              <FormItem label="资格证有效期" prop="workLicenseExpiryTime">
                <DatePicker
                  type="date"
                  style="width: 175px"
                  format="yyyyMMdd"
                  placeholder="请选择资格证有效期"
                  :value="driverData3.workLicenseExpiryTime"
                  @on-change="workLicenseEndDate"
                ></DatePicker>
              </FormItem>
              <FormItem
                style="margin-left: -2px"
                label="诚信考核有效期"
                prop="sincerityExpiryTime"
              >
                <DatePicker
                  type="date"
                  style="width: 175px"
                  format="yyyyMMdd"
                  placeholder="请选择诚信考核有效期"
                  :value="driverData3.sincerityExpiryTime"
                  @on-change="workLicenseAssessmentData"
                ></DatePicker>
              </FormItem>
              <Row>
                <Col span="8" style="margin-left: 12px">
                  <div class="demo-upload-list-driver">
                    <img
                      v-if="workLicensePicFileUrl != ''"
                      style="width: 58px"
                      height="100px"
                      :src="workLicensePicFileUrl"
                    />
                    <img
                      v-else
                      style="width: 58px"
                      height="100px"
                      src="@/assets/vehicleAtes/owner5.png"
                    />
                    <div
                      v-if="workLicensePicFileUrl != ''"
                      class="demo-upload-list-driver-cover"
                    >
                      <Icon
                        type="ios-eye-outline"
                        @click.native="showPic(workLicensePicFileUrl)"
                      ></Icon>
                    </div>
                  </div>
                  <Upload
                    v-if="driverShowImg"
                    :on-progress="qualificationCertificate"
                    :beforeUpload="beforeUpload"
                    ref="companyUpload"
                    :show-upload-list="false"
                    :on-success="workLicenesSuccess"
                    :format="['jpg', 'jpeg', 'png']"
                    :on-format-error="handleFormatError"
                    :headers="header"
                    :data="{
                      fileType: 'DRIVER_WORK_PIC',
                      userId: form.userId,
                    }"
                    type="drag"
                    :action="upLoadWorkLicense"
                    style="display: inline-block; width: 30px"
                  >
                    <div style="width: 30px; height: 30px; line-height: 30px">
                      <Icon type="ios-camera" size="20"></Icon>
                    </div>
                  </Upload>
                  <div class="demo-uploadcss-drivre">
                    <template>
                      <Progress
                        v-if="qualificationTrue"
                        text-inside
                        :percent="load"
                        :stroke-width="3"
                      ></Progress>
                    </template>
                  </div>
                  <div style="margin-top: 8px" class="check">
                    <span class="check_font">从业资格证</span>
                  </div>
                </Col>

                <Col span="8" style="margin-left: 12px">
                  <div class="demo-upload-list-driver">
                    <img
                      v-if="workLicensePicFileUrlSidePage != ''"
                      style="width: 58px"
                      height="100px"
                      :src="workLicensePicFileUrlSidePage"
                    />
                    <img
                      v-else
                      style="width: 58px"
                      height="100px"
                      src="@/assets/vehicleAtes/owner5.png"
                    />
                    <div
                      v-if="workLicensePicFileUrlSidePage != ''"
                      class="demo-upload-list-driver-cover"
                    >
                      <Icon
                        type="ios-eye-outline"
                        @click.native="showPic(workLicensePicFileUrlSidePage)"
                      ></Icon>
                    </div>
                  </div>
                  <Upload
                    v-if="driverShowImg"
                    :on-progress="qualificationSidePage"
                    :beforeUpload="beforeUpload"
                    ref="companyUpload"
                    :show-upload-list="false"
                    :on-success="workLicenesSuccessSidePage"
                    :format="['jpg', 'jpeg', 'png']"
                    :on-format-error="handleFormatError"
                    :headers="header"
                    :data="{
                      fileType: 'DRIVER_WORK_PIC',
                      userId: form.userId,
                    }"
                    type="drag"
                    :action="upLoadWorkLicense"
                    style="display: inline-block; width: 30px"
                  >
                    <div style="width: 30px; height: 30px; line-height: 30px">
                      <Icon type="ios-camera" size="20"></Icon>
                    </div>
                  </Upload>
                  <div class="demo-uploadcss-drivre">
                    <template>
                      <Progress
                        v-if="qualificationTrueSidePage"
                        text-inside
                        :percent="load"
                        :stroke-width="3"
                      ></Progress>
                    </template>
                  </div>
                  <div style="margin-top: 8px">
                    <span class="check_font">诚信考核情况</span>
                  </div>
                </Col>
              </Row>
              <Row>
                <Col>
                  <Button
                    v-if="driverShowImg"
                    style="margin-top: 22px"
                    type="warning"
                    :loading="loadinWorkLicenseInfo"
                    @click="driverCertifications"
                    >保存资料</Button
                  >
                </Col>
              </Row>
            </Form>
          </TabPane>
        </Tabs>
        <!-- <div class="demo-drawer-footer-drivle">
          <div style="display: flex; justify-content: space-between">
            <div style="display: flex">
              <div></div>
              <div
                v-if="form.completeCertificates == 1"
                class="popover-Tagdrverr"
              >
                <el-popover
                  placement="top"
                  ref="popoverSH"
                  title=""
                  width="100%"
                  style="padding: 2px"
                  trigger="click"
                  content=""
                >
                  <Tag slot="reference" color="red">
                    <span>存在缺失</span>
                  </Tag>
                  <div>
                    <span>
                      <span
                        ><Icon style="color: red" type="md-close-circle" />
                      </span>
                      <span style="margin-left: 5px">缺失信息</span>
                    </span>
                    <div class="MissingLinx"></div>
                    <div
                      v-if="
                        form.informationTips == null ||
                        form.informationTips == ''
                      "
                      class="popoverDiv"
                    >
                      缺失信息为空，可能存在错误！
                    </div>
                    <div
                      v-else
                      class="popoverDiv"
                      v-for="(item, index) in form.informationTipsVehicle"
                      :key="index"
                    >
                      {{ index + 1 }}. {{ item }}<br />
                    </div>
                  </div>
                </el-popover>
              </div>
              <div class="popover-Tagdrverr" v-else>
                <Tag
                  :color="form.completeCertificates == 2 ? 'green' : 'default'"
                >
                  <span>{{
                    form.completeCertificates == 2 ? "要素完整" : "未知错误"
                  }}</span>
                </Tag>
              </div>
            </div>
            <div>
              <Button type="primary" @click="adoptDriverCertificateInformation"
                >审核通过</Button
              >
              &nbsp;
              <Button type="error" @click="repulseDriverCertificateInformation"
                >审核不通过</Button
              >
            </div>
          </div>
        </div> -->
        <Spin size="large" fix v-if="spinShow"></Spin>
      </div>
    </Drawer>
    <!-- 审核不审核通过 -->
    <Modal v-model="auditFailedModal" title="审核不通过">
      <span style="font-size: 15px">
        {{ confirmRejection }}
      </span>
      <Input
        style="margin-top: 10px"
        v-model="AuditFailedInput"
        type="textarea"
        :rows="4"
        placeholder="请输入审核不通过原因"
      />
      <div slot="footer">
        <Button @click="auditFailedModal = false">取消</Button>
        <Button
          :loading="loadingbut"
          type="primary"
          @click="auditRejectDetermine"
          >确定</Button
        >
      </div>
    </Modal>
    <!--  -->
    <Modal v-model="customType" title="认证类型">
      <RadioGroup v-model="customerType">
        <!-- <Radio label="驾驶员" name="3"></Radio> -->
        <Radio label="车主" name="1"></Radio>
        <Radio label="个体户" name="2"></Radio>
      </RadioGroup>
      <div slot="footer">
        <Button @click="customType = false">取消</Button>
        <Button :loading="loadingbut" type="primary" @click="customTypeModal"
          >确定</Button
        >
      </div>
    </Modal>

    <Modal v-model="numberDrivers" title="驾驶员" width="1300">
      <Form
        ref="fromDrivers"
        :model="fromDrivers"
        inline
        :label-width="70"
        class="search-form"
      >
        <FormItem label="驾驶员姓名" prop="driverName">
          <Input
            type="text"
            v-model="fromDrivers.driverName"
            placeholder="请输入驾驶员姓名"
            clearable
            style="width: 180px"
          />
        </FormItem>
        <FormItem label="手机号码">
          <Input
            type="text"
            v-model="fromDrivers.driverPhone"
            placeholder="请输入手机号码"
            clearable
            style="width: 180px"
          />
        </FormItem>
        <FormItem label="车牌号" prop="vehicleNum">
          <Input
            type="text"
            v-model="fromDrivers.vehicleNum"
            placeholder="请输入车牌号"
            clearable
            style="width: 180px"
          />
        </FormItem>
        <FormItem label="认证状态">
          <Select v-model="fromDrivers.driverUserStatus" style="width: 180px">
            <Option value="">全部</Option>
            <Option value="0">未认证</Option>
            <Option value="1">已认证</Option>
            <Option value="2">待审核</Option>
            <Option value="3">已过期</Option>
          </Select>
        </FormItem>

        <span style="margin-left: 35px" class="br">
          <Button
            @click="getPcJoinDriverVoList"
            type="primary"
            icon="ios-search"
            >搜索</Button
          >
          <Button @click="driversHandleReset">重置</Button>
        </span>
      </Form>
      <Row>
        <Table
          :loading="loading1"
          border
          :columns="columnDrivers"
          :data="getPcJoinDriverVoData"
          ref="table"
          sortable="custom"
          class="table"
        >
        </Table>
      </Row>
      <div style="width: 100%; height: 20px"></div>
      <Row type="flex" justify="end" class="page">
        <Page
          :current="fromDrivers.pageNumber"
          :total="fromDrivers.total"
          :page-size="fromDrivers.pageSize"
          @on-change="changePageDrivers"
          @on-page-size-change="changePageSizeDrivers"
          :page-size-opts="[10, 20, 50]"
          size="small"
          show-total
          show-elevator
          show-sizer
        ></Page>
      </Row>
      <div slot="footer"></div>
    </Modal>
    <!--  -->
    <Modal v-model="numberVehicles" title="车辆" width="1300">
      <Form
        ref="fromVehicles"
        :model="fromVehicles"
        inline
        :label-width="70"
        class="search-form"
      >
        <FormItem label="车牌号" prop="vehicleNum">
          <Input
            type="text"
            v-model="fromVehicles.vehicleNum"
            placeholder="请输入车牌号"
            clearable
            style="width: 180px"
          />
        </FormItem>

        <FormItem label="驾驶驾驶员">
          <Input
            type="text"
            v-model="fromVehicles.driverName"
            placeholder="请输入驾驶驾驶员"
            clearable
            style="width: 180px"
          />
        </FormItem>
        <FormItem label="认证状态">
          <Select v-model="fromVehicles.registStatus" style="width: 180px">
            <Option value="">全部</Option>
            <Option value="0">未认证</Option>
            <Option value="1">已认证</Option>
            <Option value="2">待审核</Option>
            <Option value="3">已过期</Option>
          </Select>
        </FormItem>
        <span style="margin-left: 35px" class="br">
          <Button @click="getPcTransportData" type="primary" icon="ios-search"
            >搜索</Button
          >
          <Button @click="vehicleHandleReset">重置</Button>
        </span>
      </Form>
      <Row>
        <Table
          :loading="loading1"
          border
          :columns="columnVehicles"
          :data="getPcTransportVehicleListData"
          ref="table"
          sortable="custom"
          class="table"
        >
        </Table>
      </Row>
      <div style="width: 100%; height: 20px"></div>
      <Row type="flex" justify="end" class="page">
        <Page
          :current="fromVehicles.pageNumber"
          :total="fromVehicles.total"
          :page-size="fromVehicles.pageSize"
          @on-change="changeSortVehicles"
          @on-page-size-change="changeSelectVehicles"
          :page-size-opts="[10, 20, 50]"
          size="small"
          show-total
          show-elevator
          show-sizer
        ></Page>
      </Row>
      <div slot="footer"></div>
    </Modal>
    <!-- 驾驶员详情   -->
    <DriverDetails
      @DriverDetaEnd="DriverDetaEnd"
      :BidderdUserId="BidderdUserId"
      :driverModalue="this.driverModalue"
    >
    </DriverDetails>

    <!-- 车辆详情 -->
    <VehicleDetails
      @VehicleDetailsEnd="VehicleDetailsEnd"
      :VehicleDetailsId="VehicleDetailsId"
      :VehicleDetailsModalue="this.VehicleDetailsModalue"
    >
    </VehicleDetails>
    <addDriver
      :data="form"
      :type="showType"
      v-model="showUser"
      @on-submit="getDataList"
    />
  </div>
</template>
<script>
// 根据你的实际请求api.js位置路径修改
import VehicleDetails from "@/views/componentsonn_source_goods/VehicleDetails";
import DriverDetails from "@/views/componentsonn_source_goods/DriverDetails";
// 根据你的实际添加编辑组件位置路径修改
import {
  disableUser,
  enableUser,
  addDownloadRecord,
  bank_card_type,
  uploadBankCardPic,
} from "@/api/index";
import excel from "@/libs/excel";
// 新增驾驶员
import addDriver from "./addDriver.vue";
////////////////////////////////////////////////////////
import {
  getTransportationCompany,
  saveDriverInfo,
  getCarrierDriverVo,
  getIdCarDInfo,
  getDriverLicenseInfo,
  getWorkLicenseInfo,
  getOwnerUserInfo,
  getIndividualUserInfo,
  saveOwnerInfo, //保存车主信息
  saveIndividualInfo, //保存个体户信息
} from "@/api/user";

import {
  uploadIdCardPic,
  uploadVehiclePic,
  upLoadDriverLicense,
  upLoadWorkLicense,
  uploadHeadPortrait,
  uploadPic,
  upLoadCompanyLicense,
} from "@/api/index";
import { getStore } from "@/libs/storage";
import * as imageConversion from "image-conversion";
// 根据你的实际请求api.js位置路径修改
import {
  updateRegistStatus,
  getPcJoinDriverVo,
  getPcTransportVehicleList,
} from "@/api/user";
export default {
  name: "driverInfo",
  data() {
    return {
      uploadBankCardPic: uploadBankCardPic, //银行卡
      personDriveCar: false,
      ownerDriveCar: false,
      basicInformation: false,
      bankCardList: [],

      BidderdUserId: "", //报价人Id
      driverModalue: false, //驾驶员详情弹框
      VehicleDetailsId: "", //车辆id
      VehicleDetailsModalue: false, //车辆详情弹框

      getPcJoinDriverVoData: [],
      loading1: false,
      vehiclUserId: "",
      driverUserId: "",
      numberDrivers: false,
      numberVehicles: false,
      getPcTransportVehicleListData: [],
      fromDrivers: {
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
        total: 0,
        registStatus: "",
        vehicleNum: "",
        driverName: "",
      },
      vehicleLength: [],
      vehicleType: [],
      fromVehicles: {
        registStatus: "",
        vehicleType: "",
        vehicleLength: "",
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
        total: 0,
      },

      authenticationTilel: "",
      upLoadCompanyLicense: upLoadCompanyLicense,
      driverShowImg: false,
      customerTypess: "",

      customType: false,
      customerType: "车主",
      customerTypes: "",
      uploadPic: uploadPic,

      ownerInformation: false,
      selmployedInformation: false,

      uploadHeadPortrait: uploadHeadPortrait,
      auditFailedModal: false, // 审核不通过
      confirmRejection: "",
      AuditFailedInput: "",
      loadingbut: false,

      spinShow: false,
      //新增驾驶员
      showUser: false,
      showType: "0",

      openSearch: true, // 显示搜索
      openTip: true, // 显示提示
      showType: "0", // 添加或编辑标识
      showDrawer: false, // 显示添加编辑抽屉
      loading: true, // 表单加载状态
      drop: false,
      dropDownContent: "展开",
      dropDownIcon: "ios-arrow-down",
      searchForm: {
        // 搜索框初始化对象
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
        sort: "createTime", // 默认排序字段
        order: "desc", // 默认排序方式
        name: "",
        vehicleNum: "",
        mobile: "",
        actualCarrierStatus: "", //默认查全部
      },
      form: {},
      exportModalVisible: false, // 自定义导出显示
      exportData: [], // 多选数据
      exportTitle: "确认导出",
      filename: "驾驶员数据",
      loadingExport: true, // 导出加载状态\
      chooseColumns: [],
      exportRemarks: "",
      exportColumns: [
        {
          title: "#",
          key: "serialNumber",
          minWidth: 60,
          sortable: true,
        },
        {
          title: "认证状态",
          key: "exportRegistStatus",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "状态",
          key: "exportStatus",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "登录账号",
          key: "mobile",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "用户名",
          key: "name",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "性别",
          key: "sex",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "年龄",
          key: "birth",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "身份证号",
          key: "num",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "准驾车型",
          key: "driverType",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "驾驶车辆",
          key: "vehicleNum",
          minWidth: 100,
          sortable: true,
        },
        {
          title: "家庭地址",
          key: "address",
          minWidth: 100,
          sortable: true,
        },

        {
          title: "更新时间",
          key: "updateTime",
          minWidth: 100,
          sortable: true,
        },
      ],
      columns: [
        {
          type: "selection",
          minWidth: 60,
          align: "center",
        },
        {
          title: "#",
          type: "index",
          minWidth: 60,
        },
        {
          title: "状态",
          key: "status",
          // align: "center",
          width: 100,
          render: (h, params) => {
            if (params.row.status == 0) {
              return h("div", [
                h("Badge", {
                  props: {
                    status: "success",
                    text: "启用",
                  },
                }),
              ]);
            } else if (params.row.status == -1) {
              return h("div", [
                h("Badge", {
                  props: {
                    status: "error",
                    text: "禁用",
                  },
                }),
              ]);
            }
          },
          filters: [
            {
              label: "启用",
              value: 0,
            },
            {
              label: "禁用",
              value: -1,
            },
          ],
          filterMultiple: false,
          filterRemote: (e) => {
            let v = "";
            if (e.length > 0) {
              v = e[0];
            }
            this.searchForm.status = v;
            this.searchForm.pageNumber = 1;
            this.getDataList();
          },
        },

        {
          title: "头像",
          key: "avatar",
          width: 80,
          // align: "center",
          render: (h, params) => {
            let avatarUrl = "";
            if (
              params.row.avatar ==
              "https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png"
            ) {
              avatarUrl = "https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png";
            } else if (params.row.avatar == "" || params.row.avatar == null) {
              avatarUrl = "https://ooo.0o0.ooo/2019/04/28/5cc5a71a6e3b6.png";
            } else {
              avatarUrl =
                this.$baseUrl +
                "/freight/file/view/" +
                params.row.avatar +
                "?accessToken=" +
                this.accessToken +
                "&preview=true";
            }
            return h("Avatar", {
              props: {
                src: avatarUrl,
              },
            });
          },
        },
        {
          title: "登录账号",
          key: "username",
          minWidth: 125,
          sortable: false,
        },
        {
          title: "用户姓名",
          key: "nickName",
          minWidth: 100,
          sortable: false,
          tooltip: true,
        },
        {
          title: "认证类型",
          key: "carrierType",
          minWidth: 100,
          sortable: false,
          render: (h, params) => {
            let text = "";
            if (params.row.carrierType == 1) {
              text = "车主";
            } else if (params.row.carrierType == 2) {
              text = "个体户";
            } else {
              return h(
                "div",
                {
                  style: {
                    color: "#D0C4DE",
                  },
                },
                "未知"
              );
            }
            return h("div", text);
          },
        },

        {
          title: "联系电话",
          key: "username",
          minWidth: 130,
          sortable: false,
        },

        {
          title: "身份证号",
          key: "num",
          minWidth: 190,
          sortable: false,
        },
        {
          title: "道路运输经营许可证号",
          key: "roadPermitNo",
          minWidth: 180,
          sortable: false,
        },

        {
          title: "驾驶员数",
          key: "driverNum",
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            let num = "";
            if (params.row.driverNum) {
              num = params.row.driverNum;
            } else {
              num = "0";
            }
            return h("div", [
              h(
                "a",
                {
                  on: {
                    click: () => {
                      this.numberDrivers = true;
                      this.driverUserId = params.row.userId;
                      this.getPcJoinDriverVoList(params.row);
                    },
                  },
                },
                num
              ),
            ]);
          },
        },
        {
          title: "车辆数",
          key: "vehicleNum",
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            let num = "";
            if (params.row.vehicleNum) {
              num = params.row.vehicleNum;
            } else {
              num = "0";
            }
            return h("div", [
              h(
                "a",
                {
                  on: {
                    click: () => {
                      this.numberVehicles = true;
                      this.vehiclUserId = params.row.userId;
                      this.getPcTransportData(params.row);
                    },
                  },
                },
                num
              ),
            ]);
          },
        },
        // {
        //   title: "驾驶证有效期",
        //   key: "endDate",
        //   minWidth: 130,
        //   sortable: false,
        //   render:(h,params)=>{
        //     if(params.row.endDate){
        //       let val = params.row.endDate
        //       let arr = val.split('-')
        //       let text = arr[0] + arr[1] + arr[2]
        //       return h('div',text)
        //     }
        //   }
        // },
        // {
        //   title: "资格证有效期",
        //   key: "workLicenseExpiryTime",
        //   minWidth: 130,
        //   sortable: false,
        //   render:(h,params)=>{
        //     if(params.row.endDate){
        //       let val = params.row.workLicenseExpiryTime
        //       let arr = val.split('-')
        //       let text = arr[0] + arr[1] + arr[2]
        //       return h('div',text)
        //     }
        //   }
        // },
        // {
        //   title: "归属车队",
        //   key: "describeInfo",
        //   minWidth: 220,
        //   sortable: false,
        //   render:(h,params)=>{
        //     let text = params.row.describeInfo
        //     if(!text){
        //       text = '无'
        //     }
        //     return h('div',text)
        //   }
        // },
        {
          title: "驾驶员认证",
          key: "createTime",
          minWidth: 130,
          sortable: false,
          render: (h, params) => {
            // 0 未认证 1已认证 2审核中 3已过期
            let colorStatus = "";
            let titleText = "";
            if (params.row.driverUserStatus == 0) {
              colorStatus = "error";
              titleText = "未认证";
            } else if (params.row.driverUserStatus == 1) {
              colorStatus = "success";
              titleText = "已认证";
            } else if (params.row.driverUserStatus == 2) {
              colorStatus = "processing";
              titleText = "待审核";
            } else if (params.row.driverUserStatus == 2) {
              colorStatus = "error";
              titleText = "已过期";
            }
            return h("div", [
              h("Badge", {
                props: {
                  status: colorStatus,
                  text: titleText,
                },
              }),
            ]);
          },
        },
        {
          title: "更新时间",
          key: "createTime",
          minWidth: 180,
          sortable: false,
        },
        {
          title: "认证状态",
          key: "actualCarrierStatus",
          minWidth: 100,
          align: "center",
          fixed: "right",
          render: (h, params) => {
            let colorStatus = "";
            let titleText = "";
            if (params.row.actualCarrierStatus == 0) {
              colorStatus = "error";
              titleText = "未认证";
            } else if (params.row.actualCarrierStatus == 1) {
              colorStatus = "success";
              titleText = "已认证";
            } else if (params.row.actualCarrierStatus == 2) {
              colorStatus = "processing";
              titleText = "待审核";
            } else if (params.row.actualCarrierStatus == 3) {
              colorStatus = "error";
              titleText = "已过期";
            }
            return h("div", [
              h("Badge", {
                props: {
                  status: colorStatus,
                  text: titleText,
                },
              }),
            ]);
          },
        },
        {
          title: "操作",
          key: "action",
          align: "center",
          fixed: "right",
          width: 120,
          render: (h, params) => {
            if (params.row.status == 0) {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.edit(params.row);
                      },
                    },
                  },
                  "查看"
                ),
                h("Divider", {
                  props: {
                    type: "vertical",
                  },
                }),
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.frozen(params.row);
                      },
                    },
                  },
                  "禁用"
                ),
                //
              ]);
            } else if (params.row.status == -1) {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.edit(params.row);
                      },
                    },
                  },
                  "查看"
                ),
                h("Divider", {
                  props: {
                    type: "vertical",
                  },
                }),
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.Enable(params.row);
                      },
                    },
                  },
                  "启用"
                ),
                //
              ]);
            }
          },
        },
      ],
      columnDrivers: [
        {
          title: "#",
          type: "index",
          minWidth: 60,
        },
        {
          title: "认证状态",
          key: "driverUserStatus",
          minWidth: 100,
          align: "center",
          render: (h, params) => {
            let colorStatus = "";
            let titleText = "";
            if (params.row.driverUserStatus == 0) {
              colorStatus = "error";
              titleText = "未认证";
            } else if (params.row.driverUserStatus == 1) {
              colorStatus = "success";
              titleText = "已认证";
            } else if (params.row.driverUserStatus == 2) {
              colorStatus = "processing";
              titleText = "待审核";
            } else if (params.row.driverUserStatus == 3) {
              colorStatus = "error";
              titleText = "已过期";
            }
            return h("div", [
              h("Badge", {
                props: {
                  status: colorStatus,
                  text: titleText,
                },
              }),
            ]);
          },
        },
        {
          title: "驾驶员姓名",
          key: "driverName",
          minWidth: 110,
          render: (h, params) => {
            let driverUserName = params.row.driverName;
            let placTop = "top";
            if (params.index == 0) {
              placTop = "bottom";
            } else {
              placTop = "top";
            }
            return h(
              "Tooltip",
              {
                props: {
                  transfer: true,
                  placement: placTop,
                  maxWidth: "110",
                  content: driverUserName,
                },
              },
              [
                h(
                  "a",
                  {
                    props: {
                      type: "primary",
                      size: "small",
                    },

                    on: {
                      click: () => {
                        this.BidderdDiver(params.row);
                      },
                    },
                  },
                  driverUserName
                ),
              ]
            );
          },
        },
        {
          title: "手机号码",
          key: "driverPhone",
          minWidth: 160,
          sortable: false,
        },
        {
          title: "已接单数",
          key: "receivedOrder",
          minWidth: 150,
          sortable: false,
          render: (h, params) => {
            if (params.row.receivedOrder) {
              return h("div", params.row.receivedOrder + " 单");
            } else {
              return h("div", 0 + " 单");
            }
          },
        },
        {
          title: "好评率",
          key: "goodRate",
          minWidth: 150,
          sortable: false,
          render: (h, params) => {
            if (params.row.goodRate) {
              return h("div", params.row.goodRate + " %");
            } else {
              return h("div", 0 + " %");
            }
          },
        },
        {
          title: "准驾车型",
          key: "driverType",
          minWidth: 120,
          tooltip: true,
        },
        {
          title: "驾驶车辆",
          key: "vehicleNum",
          minWidth: 120,
          render: (h, params) => {
            if (params.row.vehicleNum == "" || params.row.vehicleNum == null) {
              return h(
                "div",
                {
                  style: {
                    color: "#D0C4DE",
                  },
                },
                "未绑定"
              );
            } else {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.LookVehicleInfo(params.row);
                      },
                    },
                  },
                  params.row.vehicleNum
                ),
              ]);
            }
          },
        },
        {
          title: "作业状态",
          key: "taskState",
          minWidth: 100,
          sortable: false,
          render: (h, params) => {
            if (params.row.taskState == "0") {
              return h("span", "空闲");
            } else if (params.row.taskState == "1") {
              return h("span", "满载");
            } else {
              return h("span", "未知");
            }
          },
        },
      ],
      columnVehicles: [
        {
          title: "#",
          type: "index",
          minWidth: 60,
        },
        {
          title: "认证状态",
          key: "registStatus",
          minWidth: 100,
          align: "center",

          render: (h, params) => {
            let colorStatus = "";
            let titleText = "";
            if (params.row.registStatus == 0) {
              colorStatus = "error";
              titleText = "未认证";
            } else if (params.row.registStatus == 1) {
              colorStatus = "success";
              titleText = "已认证";
            } else if (params.row.registStatus == 2) {
              colorStatus = "processing";
              titleText = "待审核";
            } else if (params.row.registStatus == 3) {
              colorStatus = "error";
              titleText = "已过期";
            }
            return h("div", [
              h("Badge", {
                props: {
                  status: colorStatus,
                  text: titleText,
                },
              }),
            ]);
          },
        },
        {
          title: "驾驶车辆",
          key: "vehicleNum",
          minWidth: 120,
          render: (h, params) => {
            if (params.row.vehicleNum == "" || params.row.vehicleNum == null) {
              return h(
                "div",
                {
                  style: {
                    color: "#D0C4DE",
                  },
                },
                "未绑定"
              );
            } else {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.LookVehicleInfo(params.row);
                      },
                    },
                  },
                  params.row.vehicleNum
                ),
              ]);
            }
          },
        },

        {
          title: "车牌颜色",
          key: "colorType",
          minWidth: 120,
          render: (h, params) => {
            if (params.row.colorType) {
              let text = this.$options.filters["VEHICLE_COLOR"](
                params.row.colorType
              );
              return h("div", text);
            } else {
              return h(
                "div",
                {
                  style: {
                    color: "#D0C4DE",
                  },
                },
                "未选择"
              );
            }
          },
        },
        {
          title: "能源类型",
          key: "oilType",
          minWidth: 140,
          sortable: false,
          render: (h, params) => {
            if (params.row.oilType) {
              let text = this.$options.filters["OILTYPE"](params.row.oilType);
              return h("div", text);
            } else {
              return h(
                "div",
                {
                  style: {
                    color: "#D0C4DE",
                  },
                },
                "未选择"
              );
            }
          },
        },
        {
          title: "车辆类型",
          key: "vehicleCodeType",
          minWidth: 200,
          sortable: false,
          render: (h, params) => {
            if (params.row.vehicleCodeType) {
              let text = this.$options.filters["VEHICLENEWTYPE"](
                params.row.vehicleCodeType
              );
              return h("div", text);
            } else {
              return h(
                "div",
                {
                  style: {
                    color: "#D0C4DE",
                  },
                },
                "未选择"
              );
            }
          },
        },
        {
          title: "核定载质量",
          key: "approvedLoad",
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            return h("div", params.row.approvedLoad + " 吨");
          },
        },
        {
          title: "驾驶驾驶员",
          key: "driverName",
          minWidth: 120,
          sortable: false,
          render: (h, params) => {
            if (params.row.driverName) {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.BidderdDiver(params.row);
                      },
                    },
                  },
                  params.row.driverName
                ),
              ]);
            } else {
              return h(
                "div",
                {
                  style: {
                    color: "#D0C4DE",
                  },
                },
                "未绑定"
              );
            }
          },
        },
      ],
      data: [], // 表单数据
      pageNumber: 1, // 当前页数
      pageSize: 10, // 页面大小
      total: 0, // 表单数据总数
      ////////////////////////////////////////////////////////////////////////////////
      driverVisible: false,
      load: 0, // 动态显示进度条

      loadinIdcardInfo: false,
      loadinDriverInfo: false,
      loadinWorkLicenseInfo: false,

      uploadIdCardPic: uploadIdCardPic,
      uploadVehiclePic: uploadVehiclePic,
      upLoadDriverLicense: upLoadDriverLicense,
      upLoadWorkLicense: upLoadWorkLicense,
      visible: this.value,
      imgVisible: false,

      header: {
        accessToken: getStore("accessToken"),
      },
      accessToken: getStore("accessToken"),
      title: "",
      driverTabPane: "name1",
      driverData: {
        userId: "", // 用户id
        num: "", // 身份证号
        name: "", // 姓名
        address: "", // 地址
        birth: "", // 生日
        sex: "", // 性别
        nationality: "", // 民族
        issue: "", // 签发机关
        startDate: "", // 身份证起始日期
        endDate: "", // 身份证结束日期
        idCardFontPicFileId: "", // 身份证前置照片地址
        idCardBackPicFileId: "", // 身份证后置照片地址
        holdIdCardFileId: "", // 手持身份证照片ID
        driverPhotosFileId: "", // 驾驶员照片ID

        licenseName: "", // 驾驶证 --- 姓名
        licenseNum: "", // 驾驶证 --- 驾驶证号
        driverType: "", // 驾驶证准驾车型
        licenseStartDate: "", // 驾驶证有效期开始时间
        issuingOrganizations: "", // 驾驶证 --- 发证机关
        licenseEndDate: "", // 驾驶证有效期时长
        issueDate: "", // 驾驶证 --- 初次领证日期
        yearlyInspectionDate: "", //驾驶证 --- 年检日期

        addr: "", // 驾驶证 --- 地址
        licenseSex: "", // 驾驶证 --- 性别
        archiveNo: "", // 驾驶证 --- 档案编号
        driverFontPicFileID: "", // 驾照证正面地址
        driverBackPicFileID: "", // 驾照证反面地址

        workLicenseNo: "", // 从业资格证号
        workLicenseExpiryTime: "", // 资格证到期时间
        workLicensePicFileId: "", // 从业资格证文件id
        roadPermitNo: "", // 道路运输经营许可证号
        roadPermitNoDate: "", // 道路运输经营许可证有效期
        roadOperPermitPicFileId: "", // 道路经营许可证
        affiliatedCompanyName: "", // 挂靠运输公司名称
        affiliatedCompanyCode: "", // 统一社会信用代码

        phone: "", // 手机号
        cardNumber: "", // 银行卡号
        cardName: "", // 银行卡名
        cardCode: "", // 银行编码
        bankFileId: "", // 银行卡照片

        ownerNum: "", // 身份证号
        ownerName: "", // 姓名
        ownerAddress: "", // 地址
        ownerBirth: "", // 生日
        ownerSex: "", // 性别
        ownerNationality: "", // 民族
        ownerStartDate: "", // 身份证起始日期
        ownerEndDate: "", // 身份证结束日期
        ownerIssue: "", // 签发机关
        ownerIdCardFontPicFileId: "", // 身份证前置照片地址
        ownerIdCardBackPicFileId: "", // 身份证后置照片地址
        ownerHoldIdCardFileId: "", // 手持身份证照片ID
        businessLicenseFileId: "", //营业执照

        affiliatedAgreement: "", //车辆挂靠协议
        contactPhone: "", //联系人电话
        workBackLicensePicFileId: "", // 从业资格证 - 背面文件id
        sincerityExpiryTime: "", // 诚信考核有效期
      },

      driverRegistStatus: "",
      submitLoading: false,
      maxHeight: 510,
      activeSrc: "",
      idCardFontPicFileUrl: "", //驾驶员身份证正面
      idCardBackPicFileUrl: "", //驾驶员身份证背面
      personalIDCardUrl: "", //驾驶员手持身份证
      FrontIDCardTrue: false, // 驾驶员身份证正面
      ReverseSideIDCardTrue: false, // 驾驶员身份证背面
      progressCardBack: false, //驾驶员手持身份证进度条

      driverPhotosId: "", //驾驶员照片
      driverPhotosIdProgress: false, //驾驶员照片进度条

      driverFontPicFileUrl: "", //驾照主页
      driverBackPicFileUrl: "", //驾照副页
      DriverLicenseTrue: false, // 驾照主页关闭进度条
      DriverLicenPageTrue: false, // 驾照副页关闭进度条

      qualificationTrue: false, // 从业资格证关闭进度条
      workLicensePicFileUrl: "", //从业资格证
      workLicensePicFileUrlSidePage: "", //诚信考核情况
      qualificationTrueSidePage: false, //诚信考核情况

      //车主
      ownerCardFontPicFileId: "", //车主身份证正面照ID
      ownerCardBackPicFileId: "", //车主身份证背面照ID
      ownerHandHeldIDCard: "", //车主手持身份证照片ID
      bankCard: "", // 银行卡
      bankCardideIDCardShow: false, // 银行卡
      ownerProgressFontShow: false, //车主身份证正面照ID
      owneroBackShow: false, //车主身份证背面照ID
      ownerSideIDCardShow: false, //车主手持身份证照片ID
      //
      frontOperatorIDCard: "", //经营者身份证正面
      frontProgressFontShow: false, //经营者身份证正面进度条

      frontBackPicFileId: "", //经营者身份证背面
      frontBackShow: false, //经营者身份证背面进度条

      frontHandHeldIDCard: "", //经营者手持身份证
      frontSideIDCardShow: false, //经营者身份证背面进度条

      frontbusinessLicense: "", //营业执照
      frontbusinessProgressShow: false, //营业执照面进度条

      affiliationAgreement: "", //车辆挂靠协议
      affiliationLicensetrue: false, //车辆挂靠协议进度条

      xukezhengPicFileUrl: "", //道路运输经营许可证照片
      BusineLicensetrue: false, //道路运输经营许可证照片

      RealAuthentication: {
        name: [
          {
            required: true,
            message: "请输入姓名",
            trigger: "blur",
          },
        ],
        num: [
          {
            required: true,
            message: "请输入身份证号码",
            trigger: "blur",
          },
        ],
        birth: [
          {
            required: true,
            message: "请输入出生日期",
            trigger: "blur",
          },
        ],
        address: [
          {
            required: true,
            message: "请输入家庭地址",
            trigger: "blur",
          },
        ],
        sex: [
          {
            required: true,
            message: "请输入性别",
            trigger: "blur",
          },
        ],
        startDate: [
          {
            required: true,
            message: "请输入开始时间",
            trigger: "blur",
          },
        ],
        endDate: [
          {
            required: true,
            message: "请输入有效截至时间",
            trigger: "blur",
          },
        ],
      },
      // 车主信息
      driverData1: {
        ownerName: "",
        ownerNum: "",
        ownerEndDate: "",
        cardName: "",
        contactPhone: "",
        cardNumber: "",
        phone: "",
        roadPermitNo: "",
        roadPermitNoDate: "",
        affiliatedCompanyName: "",
      },
      RealAuthentication1: {
        ownerName: [
          {
            required: true,
            message: "请输入姓名",
            trigger: "blur",
          },
        ],
        ownerNum: [
          {
            required: true,
            message: "请输入车主身份证号",
            trigger: "blur",
          },
        ],
        ownerEndDate: [
          {
            required: true,
            message: "请选择身份证有效期",
            trigger: "change",
          },
        ],
        affiliatedCompanyName: [
          {
            required: true,
            message: "请输入挂靠运输公司名称",
            trigger: "blur",
          },
        ],
        contactPhone: [
          {
            required: true,
            message: "请输入联系电话",
            trigger: "blur",
          },
        ],

        cardName: [
          {
            required: true,
            message: "请输入银行卡开户行",
            trigger: "blur",
          },
        ],

        cardNumber: [
          {
            required: true,
            message: "请输入车主银行卡号",
            trigger: "blur",
          },
        ],
        phone: [
          {
            required: true,
            message: "请输入预留手机号",
            trigger: "blur",
          },
        ],
        roadPermitNo: [
          {
            required: true,
            message: "请输入经营许可证号",
            trigger: "blur",
          },
        ],

        roadPermitNoDate: [
          {
            required: true,
            message: "请选择许可证有效期",
            trigger: "change",
          },
        ],
      },
      // 驾驶证
      driverData2: {
        licenseName: "",
        licenseNum: "",
        driverType: "",
        issueDate: "",
        licenseStartDate: "",
        licenseEndDate: "",
        issuingOrganizations: "",
        yearlyInspectionDate: "",
      },
      RealAuthentication2: {
        licenseName: [
          {
            required: true,
            message: "请输入姓名",
            trigger: "blur",
          },
        ],
        licenseNum: [
          {
            required: true,
            message: "请输入驾驶证号",
            trigger: "blur",
          },
        ],
        driverType: [
          {
            required: true,
            message: "请输入准驾车型",
            trigger: "blur",
          },
        ],

        issueDate: [
          {
            required: true,
            message: "请输入领证日期",
            trigger: "change",
          },
        ],

        licenseStartDate: [
          {
            required: true,
            message: "请选择驾驶证有效开始日期",
            trigger: "change",
          },
        ],

        licenseEndDate: [
          {
            required: true,
            message: "请选择驾驶证有效结束日期",
            trigger: "change",
          },
        ],
        yearlyInspectionDate: [
          {
            required: true,
            message: "请选择驾驶证年检日期",
            trigger: "change",
          },
        ],

        issuingOrganizations: [
          {
            required: true,
            message: "请输入发证机关",
            trigger: "blur",
          },
        ],
      },
      // 从业资格证
      driverData3: {
        workLicenseNo: "",
        workLicenseExpiryTime: "",
        sincerityExpiryTime: "",
      },
      RealAuthentication3: {
        workLicenseNo: [
          {
            required: true,
            message: "请输入从业资格证号",
            trigger: "blur",
          },
        ],
        workLicenseExpiryTime: [
          {
            required: true,
            message: "请选择资格证有效期",
            trigger: "blur",
          },
        ],
        sincerityExpiryTime: [
          {
            required: true,
            message: "请选择诚信考核有效期",
            trigger: "blur",
          },
        ],
      },
      // 车主认证
      driverData4: {
        affiliatedCompanyName: "",
        affiliatedCompanyCode: "",
        roadPermitNo: "",
        roadPermitNoDate: "",
        cardName: "",
        cardNumber: "",
        phone: "",
      },
      RealAuthentication4: {
        affiliatedCompanyName: [
          {
            required: true,
            message: "请输入挂靠运输公司名称",
            trigger: "blur",
          },
        ],
        affiliatedCompanyCode: [
          {
            required: true,
            message: "请输入统一社会信用代码",
            trigger: "blur",
          },
        ],
        roadPermitNo: [
          {
            required: true,
            message: "请输入道路运输许可证号",
            trigger: "blur",
          },
        ],

        roadPermitNoDate: [
          {
            required: true,
            message: "请选择许可证有效期",
            trigger: "change",
          },
        ],

        cardNumber: [
          {
            required: true,
            message: "请输入银行号",
            trigger: "blur",
          },
        ],
        cardName: [
          {
            required: true,
            message: "请输入开户银行",
            trigger: "blur",
          },
        ],
        phone: [
          {
            required: true,
            message: "请输入预留手机号",
            trigger: "blur",
          },
        ],
        cardCode: [
          {
            required: true,
            message: "请输入银行编码",
            trigger: "blur",
          },
        ],
      },
      // 个体户信息
      RealAuthentication5: {
        affiliatedCompanyName: [
          {
            required: true,
            message: "请输入个体户名称",
            trigger: "blur",
          },
        ],
        affiliatedCompanyCode: [
          {
            required: true,
            message: "请输入统一社会信用代码",
            trigger: "blur",
          },
        ],
        ownerName: [
          {
            required: true,
            message: "请输入经营者名称",
            trigger: "blur",
          },
        ],

        ownerNum: [
          {
            required: true,
            message: "请输入身份证号",
            trigger: "blur",
          },
        ],

        ownerEndDate: [
          {
            required: true,
            message: "请输入身份证有效期",
            trigger: "change",
          },
        ],
        roadPermitNo: [
          {
            required: true,
            message: "请输入经营许可证号",
            trigger: "blur",
          },
        ],
        roadPermitNoDate: [
          {
            required: true,
            message: "请选择许可证有效期",
            trigger: "change",
          },
        ],
        cardNumber: [
          {
            required: true,
            message: "请输入对公账户",
            trigger: "blur",
          },
        ],
        cardName: [
          {
            required: true,
            message: "请输入开户银行",
            trigger: "blur",
          },
        ],
        phone: [
          {
            required: true,
            message: "请输入预留手机号",
            trigger: "blur",
          },
        ],
        cardCode: [
          {
            required: true,
            message: "请输入银行编码",
            trigger: "blur",
          },
        ],
        contactPhone: [
          {
            required: true,
            message: "请输入联系电话",
            trigger: "blur",
          },
        ],
      },
      driverData5: {
        affiliatedCompanyName: "",
        affiliatedCompanyCode: "",
        ownerEndDate: "",
        ownerName: "",
        ownerNum: "",
        roadPermitNo: "",
        roadPermitNoDate: "",
        cardName: "",
        cardNumber: "",
        contactPhone: "",
      },
    };
  },
  components: {
    VehicleDetails,
    addDriver,
    DriverDetails,
  },
  methods: {
    // 选择银行卡开户行个体户
    bankCardSelect(val) {
      this.driverData.cardName = val.label;
      this.driverData.cardCode = val.value;
    },
    // 选择银行卡开户行车主
    bankCardSelects(val) {
      this.driverData.cardName = val.label;
      this.driverData.cardCode = val.value;
    },
    // 获取驾驶员列表
    getPcJoinDriverVoList() {
      this.loading1 = true;
      this.fromDrivers.userId = this.driverUserId;
      getPcJoinDriverVo(this.fromDrivers).then((res) => {
        this.loading1 = false;
        if (res.result.records.length > 0) {
          this.getPcJoinDriverVoData = res.result.records;
          this.fromDrivers.total = res.result.total;
        } else {
          this.getPcJoinDriverVoData = [];
        }
      });
    },
    // 车辆列表重置
    driversHandleReset() {
      this.fromDrivers.pageNumber = 1;
      this.fromDrivers.pageSize = 10;
      this.fromDrivers.driverName = "";
      this.fromDrivers.driverPhone = "";
      this.fromDrivers.vehicleNum = "";
      this.fromDrivers.driverUserStatus = "";
      this.getPcJoinDriverVoList();
    },
    // 获取车辆列表
    getPcTransportData() {
      this.fromVehicles.userId = this.vehiclUserId;
      this.loading1 = true;
      getPcTransportVehicleList(this.fromVehicles).then((res) => {
        this.loading1 = false;
        if (res.result.records.length > 0) {
          this.getPcTransportVehicleListData = res.result.records;
          this.fromVehicles.total = res.result.total;
        } else {
          this.getPcTransportVehicleListData = [];
        }
      });
    },
    // 车辆列表重置
    vehicleHandleReset() {
      this.fromVehicles.pageNumber = 1;
      this.fromVehicles.pageSize = 10;
      this.fromVehicles.vehicleNum = "";
      this.fromVehicles.driverName = "";
      this.fromVehicles.registStatus = "";
      this.getPcTransportData();
    },
    // 驾驶员
    BidderdDiver(row) {
      this.BidderdUserId = row.driverUserId;
      this.driverModalue = true;
    },
    driverDataBirth(val) {
      this.driverData.birth = val;
    },
    driverDataStartDate(val) {
      this.driverData.startDate = val;
    },
    driverDataEndDate(val) {
      this.driverData.endDate = val;
    },
    driverDataIssueDate(val) {
      this.driverData2.issueDate = val;
    },
    driverDatalicenseStartDate(val) {
      this.driverData2.licenseStartDate = val;
    },
    driverDatalicenseEndDate(val) {
      this.driverData2.licenseEndDate = val;
    },
    yearlyInspectionDateEndDate(val) {
      this.driverData2.yearlyInspectionDate = val;
    },
    driverDataOwnerEndDate(val) {
      this.driverData1.ownerEndDate = val;
    },
    // 新增驾驶员
    newDrier() {
      this.showType = "2";
      this.showUser = true;
    },
    init() {
      this.getDataList();
      // 初始化导出列数据
      let array = [];
      this.exportColumns.forEach((e) => {
        // 指定列限制权限
        if (
          !this.getStore("roles").includes("ROLE_ADMIN") &&
          e.key == "mobile"
        ) {
          e.title = "[无权导出] " + e.title;
          e.disabled = true;
        } else {
          e.disabled = false;
        }
        array.push(e.title);
      });
      this.chooseColumns = array;
    },
    changePage(v) {
      this.searchForm.pageNumber = v;
      this.getDataList();
      this.clearSelectAll();
    },
    changePageSize(v) {
      this.searchForm.pageSize = v;
      this.getDataList();
    },
    handleSearch() {
      this.searchForm.pageNumber = 1;
      this.searchForm.pageSize = 10;
      this.getDataList();
    },
    handleReset() {
      // this.$refs.searchForm.resetFields();
      this.searchForm.pageNumber = 1;
      this.searchForm.pageSize = 10;
      this.searchForm.vehicleNum = "";
      this.searchForm.registStatus = "2";
      this.searchForm.mobile = "";
      this.searchForm.name = "";
      // 重新加载数据
      this.getDataList();
    },
    changeSort(e) {
      this.searchForm.sort = e.key;
      this.searchForm.order = e.order;
      if (e.order === "normal") {
        this.searchForm.order = "";
      }
      this.getDataList();
    },
    dropDown() {
      if (this.drop) {
        this.dropDownContent = "展开";
        this.dropDownIcon = "ios-arrow-down";
      } else {
        this.dropDownContent = "收起";
        this.dropDownIcon = "ios-arrow-up";
      }
      this.drop = !this.drop;
    },
    clearSelectAll() {
      this.$refs.table.selectAll(false);
    },
    getDataList() {
      this.loading = true;
      getTransportationCompany(this.searchForm).then((res) => {
        this.loading = false;
        if (res.success) {
          this.data = res.result.records;
          this.total = res.result.total;
          this.data.forEach((item) => {
            if (item.informationTips != "" && item.informationTips != null) {
              if (
                item.informationTips.charAt(item.informationTips.length - 1) ==
                ","
              ) {
                item.informationTips = item.informationTips.substring(
                  0,
                  item.informationTips.lastIndexOf(",")
                );
              }
              item.informationTipsVehicle = item.informationTips.split(",");
            } else {
              item.informationTipsVehicle = item.informationTips;
            }
          });
          if (this.data.length == 0 && this.searchForm.pageNumber > 1) {
            this.searchForm.pageNumber -= 1;
            this.getDataList();
          }
        }
      });
    },
    changeSelect(e) {
      this.exportData = e;
      this.exportData.forEach((item, index) => {
        // 序号
        item.serialNumber = index + 1;
        // 认证状态
        if (item.registStatus == 0) {
          item.exportRegistStatus = "未认证";
        } else if (item.registStatus == 1) {
          item.exportRegistStatus = "已认证";
        } else if (item.registStatus == 2) {
          item.exportRegistStatus = "待审核";
        } else if (item.registStatus == 3) {
          item.exportRegistStatus = "已过期";
        }
        // 状态
        if (item.status == 0) {
          item.exportStatus = "启用";
        } else if (item.status == -1) {
          item.exportStatus = "禁用";
        }
        // 年龄
        if (item.birth) {
          let year = new Date().getFullYear();
          let now = Number(item.birth.substring(0, 4));
          item.birth = year - now;
        }
        // 驾驶车辆
        if (item.vehicleNum) {
          item.vehicleNum = item.vehicleNum;
        } else {
          item.vehicleNum = "未绑定";
        }
      });
    },
    exportSelectData() {
      if (this.exportData.length <= 0) {
        this.$Message.warning("您还未选择要导出的数据");
        return;
      }
      this.exportType = "part";
      this.exportModalVisible = true;
      this.exportTitle = "确认导出 " + this.exportData.length + " 条数据";
    },
    exportCustomData() {
      // 上传记录
      let param = new FormData(); // 创建form对象
      // param.append("file", a); // 通过append向form对象添加数据
      param.append("fileName", this.filename); // 添加form表单中其他数据
      param.append("fileType", 1); // 通过append向form对象添加数据
      param.append("remarks", this.exportRemarks); // 添加form表单中其他数据
      addDownloadRecord(param).then((res) => {
        if (res.code == 200) {
          // 判断勾选导出列
          let array = [];
          this.exportColumns.forEach((e) => {
            this.chooseColumns.forEach((c) => {
              if (e.title == c && !e.disabled) {
                array.push(e);
              }
            });
          });
          let filename = res.result + " " + this.filename;
          this.exportColumns = array;
          this.exportModalVisible = false;
          let title = [];
          let key = [];
          this.exportColumns.forEach((e) => {
            title.push(e.title);
            key.push(e.key);
          });
          const params = {
            title: title,
            key: key,
            data: this.exportData,
            autoWidth: true,
            filename: filename,
          };
          excel.export_array_to_excel(params);
        } else {
          this.$Message.error(res.message);
        }
      });
    },
    add() {
      this.showType = "2";
      this.showDrawer = true;
    },
    edit(v) {
      if (v) {
        this.driverData1.contactPhone = v.mobile;
        this.driverData5.contactPhone = v.mobile;
      }
      this.driverShowImg = true;
      // this.driverTabPane = "name1";
      this.spinShow = true;
      this.customerType = "车主";
      this.driverRegistStatus = v.registStatus;
      // this.customerType = "3";
      this.idCardFontPicFileUrl = ""; //身份证正面
      this.idCardBackPicFileUrl = ""; //身份证返面
      this.driverFontPicFileUrl = ""; //驾照主页
      this.driverBackPicFileUrl = ""; //驾照副页
      this.workLicensePicFileUrl = ""; //从业资格证
      this.driverPhotosId = ""; //驾驶员照片
      this.affiliationAgreementsUrl = ""; //道路运输经营许可证
      this.ownerCardFontPicFileId = ""; //车主身份证正面照ID
      this.ownerCardBackPicFileId = ""; //车主身份证背面照ID
      this.ownerHandHeldIDCard = ""; //车主手持身份证照片ID
      this.bankCard = ""; // 银行卡
      this.frontOperatorIDCard = ""; //经营者身份证正面
      this.frontBackPicFileId = ""; //经营者身份证背面
      this.frontHandHeldIDCard = ""; //经营者手持身份证
      this.frontbusinessLicense = ""; //营业执照
   
      // 转换null为""
      for (let attr in v) {
        if (v[attr] == null) {
          v[attr] = "";
        }
      }
      let str = JSON.stringify(v);
      let data = JSON.parse(str);
      this.form = data;
      this.showType = "1";
      if (
        this.form.informationTips != "" &&
        this.form.informationTips != null
      ) {
        if (
          this.form.informationTips.charAt(
            this.form.informationTips.length - 1
          ) == ","
        ) {
          this.form.informationTips = this.form.informationTips.substring(
            0,
            this.form.informationTips.lastIndexOf(",")
          );
        }
        this.form.informationTipsVehicle = this.form.informationTips.split(",");
      } else {
        this.form.informationTipsVehicle = this.form.informationTips;
      }
      this.customerTypes = v.carrierType;
      //
      this.realNameAuthentication();

      this.DriverLicenseCertification();
      // 从业资格证认证
      this.qualificationCertification();
      if (v.carrierType == null || v.carrierType == "") {
        return (this.customType = true);
      }
      if (v.carrierType == 1) {
        this.driverTabPane = "name4";
        this.authenticationTilel = "车主认证信息";
        // text = "车主";
        this.ownerInformation = true;
        this.driverShow = false;
        this.ownerShow = true;
        this.selmployedInformation = false;
        this.ownerUserInfo();
      } else if (v.carrierType == 2) {
        // "个体户";
        this.driverTabPane = "name5";
        this.authenticationTilel = "个体户认证信息";
        this.ownerInformation = false;
        this.selmployedInformation = true;
        this.selfEmployedPerson();
      }
      this.driverVisible = true;
      setInterval(() => {
        this.spinShow = false;
      }, 1000);
    },
    customTypeModal() {
      this.ownerDriveCar = false;
      this.personDriveCar = false;
      this.driverShowImg = true;
      this.basicInformation = false;
      if (this.customerType == "车主") {
        this.driverTabPane = "name4";
        this.authenticationTilel = "车主认证信息";
        this.ownerInformation = true;
        this.selmployedInformation = false;
      } else if (this.customerType == "个体户") {
        this.driverTabPane = "name5";
        this.authenticationTilel = "个体户认证信息";
        this.selmployedInformation = true;
        this.ownerInformation = false;
      }

      // if (this.customerType == "车主") {
      //   // text = "车主";
      //   this.authenticationTilel = "车主认证信息";
      //   this.ownerInformation = true;
      //   this.driverShow = false;
      //   this.ownerShow = true;
      //   this.selmployedInformation = false;
      //   this.ownerUserInfo();
      // } else if (this.customerType == "个体户") {
      //   // "个体户";
      //   this.authenticationTilel = "个体户认证信息";
      //   this.ownerInformation = false;
      //   this.selmployedInformation = true;
      //   this.selfEmployedPerson();
      // } else if (this.customerType == "驾驶员") {
      //   // text = "驾驶员";
      //   this.authenticationTilel = "驾驶员认证信息";
      //   this.ownerInformation = true;
      //   this.driverShow = true;
      //   this.ownerShow = false;
      //   this.selmployedInformation = false;
      //   this.ownerUserInfo();
      // }
      this.driverVisible = true;
      this.customType = false;
    },
    // 车主开车
    changeDriveCar(val) {
      if (this.ownerDriveCar) {
        this.basicInformation = true;
      } else {
        this.basicInformation = false;
      }
    },
    // 个体户开车
    changepersonDriveCar() {
      if (this.personDriveCar) {
        this.basicInformation = true;
      } else {
        this.basicInformation = false;
      }
    },
    // 图片格式化
    imgFormat(val) {
      let img = "";
      if (val) {
        img =
          this.$baseUrl +
          "/freight/file/view/" +
          val +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
      return img;
    },
    // 驾驶员详情
    getdriverDataDetails(val) {
      getCarrierDriverVo({ userId: val }).then((res) => {
        // 驾驶员身份证
        if (this.driverTabPane == "name1") {
          this.driverData.num = res.result.idCardVo.num;
          this.driverData.name = res.result.idCardVo.name;
          this.driverData.address = res.result.idCardVo.address;
          this.driverData.birth = res.result.idCardVo.birth;
          this.driverData.sex = res.result.idCardVo.sex;
          this.driverData.nationality = res.result.idCardVo.nationality;
          this.driverData.issue = res.result.idCardVo.issue;
          this.driverData.startDate = res.result.idCardVo.startDate;
          this.driverData.endDate = res.result.idCardVo.endDate;

          // idCardFontPicFileId: "", // 身份证前置照片地址
          // idCardBackPicFileId: "", // 身份证后置照片地址
          // holdIdCardFileId: "", // 手持身份证照片ID
          // driverPhotosFileId: "", // 驾驶员照片ID

          if (res.result.idCardVo.idCardFontPicFileId != null) {
            this.driverData.idCardFontPicFileId =
              res.result.idCardVo.idCardFontPicFileId;
            this.idCardFontPicFileUrl = this.imgFormat(
              res.result.idCardVo.idCardFontPicFileId
            );
          }
          if (res.result.idCardVo.idCardBackPicFileId != null) {
            this.driverData.idCardBackPicFileId =
              res.result.idCardVo.idCardBackPicFileId;
            this.idCardBackPicFileUrl = this.imgFormat(
              res.result.idCardVo.idCardBackPicFileId
            );
          }
        } else if (this.driverTabPane == "name2") {
          // 驾驶证
          this.driverData.licenseName = res.result.driverLicenseVo.licenseName;
          this.driverData.licenseNum = res.result.driverLicenseVo.licenseNum;
          this.driverData.driverType = res.result.driverLicenseVo.driverType;
          this.driverData.issuingOrganizations =
            res.result.driverLicenseVo.issuingOrganizations;
          this.driverData.addr = res.result.driverLicenseVo.addr;
          this.driverData.licenseSex = res.result.driverLicenseVo.licenseSex;
          this.driverData.archiveNo = res.result.driverLicenseVo.archiveNo;
          this.driverData.issueDate =
            res.result.driverLicenseVo.issueDate == null
              ? ""
              : res.result.driverLicenseVo.issueDate.replaceAll("-", "");
          this.driverData.licenseStartDate =
            res.result.driverLicenseVo.startDate == null
              ? ""
              : res.result.driverLicenseVo.startDate.replaceAll("-", "");

          this.driverData.licenseEndDate =
            res.result.driverLicenseVo.endDate == null
              ? ""
              : res.result.driverLicenseVo.endDate.replaceAll("-", "");
          if (
            res.result.driverLicenseVo.issuingOrganizations != "" &&
            res.result.driverLicenseVo.issuingOrganizations != "null" &&
            res.result.driverLicenseVo.issuingOrganizations != null
          ) {
            this.driverData.issuingOrganizations =
              res.result.driverLicenseVo.issuingOrganizations;
          } else {
            this.driverData.issuingOrganizations = "";
          }
          //
          if (res.result.driverLicenseVo.driverFontPicFileID != null) {
            this.driverData.driverFontPicFileID =
              res.result.driverLicenseVo.driverFontPicFileID;

            this.driverFontPicFileUrl = this.imgFormat(
              res.result.driverLicenseVo.driverFontPicFileID
            );
          }

          if (res.result.driverLicenseVo.driverBackPicFileID != null) {
            this.driverData.driverBackPicFileID =
              res.result.driverLicenseVo.driverBackPicFileID;

            this.driverBackPicFileUrl = this.imgFormat(
              res.result.driverLicenseVo.driverBackPicFileID
            );
          }
        } else if (this.driverTabPane == "name3") {
          // 从业资格证
          this.driverData.workLicenseNo =
            res.result.workLicenseVo.workLicenseNo;
          this.driverData.workLicenseExpiryTimes = new Date(
            res.result.workLicenseVo.workLicenseExpiryTime
          );
          this.driverData.workLicenseExpiryTime = this.$options.filters[
            "DATA_TIME"
          ](this.driverData.workLicenseExpiryTimes);

          if (res.result.workLicenseVo.workLicensePicFileId != null) {
            this.driverData.workLicensePicFileId =
              res.result.workLicenseVo.workLicensePicFileId;

            this.workLicensePicFileUrl = this.imgFormat(
              res.result.workLicenseVo.workLicensePicFileId
            );
          }
        } else if (this.driverTabPane == "name4") {
          // 车主信息
          this.driverData.ownerNum = res.result.ownerUserVo.num;
          this.driverData.ownerName = res.result.ownerUserVo.name;
          this.driverData.ownerAddress = res.result.ownerUserVo.address;
          this.driverData.ownerBirth = res.result.ownerUserVo.birth;
          this.driverData.ownerIssue = res.result.ownerUserVo.sex;
          this.driverData.ownerNationality = res.result.ownerUserVo.nationality;
          this.driverData.issue = res.result.ownerUserVo.issue;
          this.driverData.ownerStartDate = res.result.ownerUserVo.startDate;
          this.driverData.ownerEndDate = res.result.ownerUserVo.endDate;

          // idCardFontPicFileId: "", // 身份证前置照片地址
          // idCardBackPicFileId: "", // 身份证后置照片地址
          // holdIdCardFileId: "", // 手持身份证照片ID
          // driverPhotosFileId: "", // 驾驶员照片ID

          if (res.result.ownerUserVo.idCardFontPicFileId != null) {
            this.driverData.ownerIdCardFontPicFileId =
              res.result.ownerUserVo.idCardFontPicFileId;
            this.ownerCardFontPicFileId = this.imgFormat(
              res.result.ownerUserVo.idCardFontPicFileId
            );
          }
          if (res.result.ownerUserVo.idCardBackPicFileId != null) {
            this.driverData.ownerIdCardBackPicFileId =
              res.result.ownerUserVo.idCardBackPicFileId;
            this.ownerCardBackPicFileId = this.imgFormat(
              res.result.ownerUserVo.idCardBackPicFileId
            );
          }
          // 手持身份证照片ID
          if (res.result.ownerUserVo.holdIdCardFileId != null) {
            this.driverData.ownerHoldIdCardFileId =
              res.result.ownerUserVo.holdIdCardFileId;
            this.ownerHandHeldIDCard = this.imgFormat(
              res.result.ownerUserVo.holdIdCardFileId
            );
          }
        }
      });
    },
    driverTabs(val) {
      // if (this.driverTabPane == "name1") {
      //   this.spinShow = true;
      //   // // 实名认证
      //   this.realNameAuthentication();
      //   setInterval(() => {
      //     this.spinShow = false;
      //   }, 1000);
      // } else if (this.driverTabPane == "name2") {
      //   this.spinShow = true;
      //   // //  驾照认证
      //   this.DriverLicenseCertification();
      //   setInterval(() => {
      //     this.spinShow = false;
      //   }, 1000);
      // } else if (this.driverTabPane == "name3") {
      //   this.spinShow = true;
      //   this.qualificationCertification();
      //   setInterval(() => {
      //     this.spinShow = false;
      //   }, 1000);
      // } else if (this.driverTabPane == "name4") {
      //   this.spinShow = true;
      //   this.ownerUserInfo();
      //   setInterval(() => {
      //     this.spinShow = false;
      //   }, 1000);
      // } else if (this.driverTabPane == "name5") {
      //   this.spinShow = true;
      //   this.selfEmployedPerson();
      //   setInterval(() => {
      //     this.spinShow = false;
      //   }, 1000);
      // }
    },
    // 点击禁用
    frozen(v) {
      this.$Modal.confirm({
        title: "确认禁用",
        content: "您确认要禁用 " + v.name + " 用户吗?",
        loading: true,
        onOk: () => {
          disableUser(v.userId).then((res) => {
            this.$Modal.remove();
            if (res.success) {
              this.$Message.success("操作成功");
              this.getDataList();
            } else {
              this.$Message.error(res.message);
            }
          });
        },
      });
    },
    //启用
    Enable(v) {
      this.$Modal.confirm({
        title: "确认启用",
        content: "您确认要启用 " + v.name + " 用户吗?",
        loading: true,
        onOk: () => {
          enableUser(v.userId).then((res) => {
            this.$Modal.remove();
            if (res.success) {
              this.$Message.success("操作成功");
              this.getDataList();
            } else {
              this.$Message.error(res.message);
            }
          });
        },
      });
    },
    // 查看车辆详细
    LookVehicleInfo(row) {
      this.VehicleDetailsModalue = true;
      this.VehicleDetailsId = row.vehicleId;
    },
    //车辆详细信息关闭
    VehicleDetailsEnd(val) {
      this.VehicleDetailsModalue = val;
      this.VehicleDetailsId = "";
    },
    //////////////////////////////////////////////////////////////////////////
    // 查看图片
    showPic(v) {
      let image = new Image();
      image.src = v;
      let viewer = new Viewer(image, {
        hidden: function () {
          viewer.destroy();
        },
      });
      viewer.show();
    },

    // 身份证正面
    FrontIDCard(event, file, fileList) {
      this.progressAll(event, 1);
    },
    // 身份证背面
    ReverseSideIDCard(event, file, fileList) {
      this.progressAll(event, 2);
    },

    // 驾照主页
    DriverLicense(event, file, fileList) {
      this.progressAll(event, 3);
    },
    // 驾照主页
    DriverLicenPage(event, file, fileList) {
      this.progressAll(event, 4);
    },
    // 从业资格证
    qualificationCertificate(event, file, fileList) {
      this.progressAll(event, 5);
    },
    // 驾驶员手持身份证进度条
    CardBackPro(event, file, fileList) {
      this.progressAll(event, 6);
    },
    // 车主身份证正面照ID
    ownerProgressFont(event, file, fileList) {
      this.progressAll(event, 7);
    },
    // 车主身份证背面照ID
    ownerProgressBack(event, file, fileList) {
      this.progressAll(event, 8);
    },
    // 车主手持身份证照片ID
    ownerSideIDCard(event, file, fileList) {
      this.progressAll(event, 9);
    },
    // 银行卡
    bankCardideIDCard(event, file, fileList) {
      this.progressAll(event, 10);
    },
    // 车辆挂靠协议
    BusineLicense(event, file, fileList) {
      this.progressAll(event, 11);
    },
    // 驾驶员照片
    driverOnProgress(event, file, fileList) {
      this.progressAll(event, 12);
    },
    // 经营者身份证正面
    frontProgressFont(event, file, fileList) {
      this.progressAll(event, 13);
    },
    // 经营者身份证反面
    frontBackProgress(event, file, fileList) {
      this.progressAll(event, 14);
    },
    // 经营者身份证反面
    frontSideIDCard(event, file, fileList) {
      this.progressAll(event, 15);
    },
    // 营业执照
    frontbusinessProgress(event, file, fileList) {
      this.progressAll(event, 16);
    },
    // 车辆挂靠协议
    affiliationProgress(event, file, fileList) {
      this.progressAll(event, 17);
    },
    // 诚信考核情况
    qualificationSidePage(event, file, fileList) {
      this.progressAll(event, 18);
    },
    //进度条
    progressAll(data, num) {
      if (num == 1) {
        //身份证正面进度条
        this.FrontIDCardTrue = true; // 显示进度条
      } else if (num == 2) {
        //身份证背面进度条
        this.ReverseSideIDCardTrue = true; // 显示进度条
      } else if (num == 3) {
        this.DriverLicenseTrue = true;
      } else if (num == 4) {
        this.DriverLicenPageTrue = true;
      } else if (num == 5) {
        this.qualificationTrue = true;
      } else if (num == 6) {
        this.progressCardBack = true; //驾驶员手持身份证进度条
      } else if (num == 7) {
        this.ownerProgressFontShow = true;
      } else if (num == 8) {
        this.owneroBackShow = true;
      } else if (num == 9) {
        this.ownerSideIDCardShow = true;
      } else if (num == 10) {
        this.bankCardideIDCardShow = true;
      } else if (num == 11) {
        this.BusineLicensetrue = true;
      } else if (num == 12) {
        this.driverPhotosIdProgress = true;
      } else if (num == 13) {
        this.frontProgressFontShow = true;
      } else if (num == 14) {
        this.frontBackShow = true;
      } else if (num == 15) {
        this.frontSideIDCardShow = true;
      } else if (num == 16) {
        this.frontbusinessProgressShow = true;
      } else if (num == 17) {
        this.affiliationLicensetrue = true;
      } else if (num == 18) {
        this.qualificationTrueSidePage = true;
      } else if (num == 18) {
        this.qualificationTrueSidePage = true;
      }

      var CardBack = setTimeout(() => {
        this.load = parseInt(data.percent); // 动态获取文件上传进度
      }, 500); // 一秒后关闭进度条
      setTimeout(() => {
        if (this.load >= 100) {
          this.load = 100;
          setTimeout(() => {
            if (num == 1) {
              this.FrontIDCardTrue = false; // 显示进度条
            } else if (num == 2) {
              this.ReverseSideIDCardTrue = false; // 显示进度条
            } else if (num == 3) {
              this.DriverLicenseTrue = false;
            } else if (num == 4) {
              this.DriverLicenPageTrue = false;
            } else if (num == 5) {
              //身份证背面进度条
              this.qualificationTrue = false;
            } else if (num == 6) {
              //身份证背面进度条
              this.progressCardBack = false;
            } else if (num == 7) {
              //身份证背面进度条
              this.ownerProgressFontShow = false;
            } else if (num == 8) {
              //身份证背面进度条
              this.owneroBackShow = false;
            } else if (num == 9) {
              //身份证背面进度条
              this.ownerSideIDCardShow = false;
            } else if (num == 10) {
              //身份证背面进度条
              this.bankCardideIDCardShow = false;
            } else if (num == 11) {
              this.BusineLicensetrue = false;
            } else if (num == 12) {
              this.driverPhotosIdProgress = false;
            } else if (num == 13) {
              this.frontProgressFontShow = false;
            } else if (num == 14) {
              this.frontBackShow = false;
            } else if (num == 15) {
              this.frontSideIDCardShow = false;
            } else if (num == 16) {
              this.frontbusinessProgressShow = false;
            } else if (num == 17) {
              this.affiliationLicensetrue = false;
            }
          }, 1000); // 一秒后关闭进度条
          clearTimeout(CardBack);
        }
      }, 501);
    },
    // 身份证正面
    cardFontHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData.name = res.result.name;
      this.driverData.num = res.result.num;
      this.driverData.birth = res.result.birth;
      this.driverData.sex = res.result.sex;
      this.driverData.nationality = res.result.nationality;
      this.driverData.address = res.result.address;
      this.driverData.idCardFontPicFileId = res.result.fileId;
      this.driverData3.workLicenseNo = res.result.num;
      if (this.driverData.idCardFontPicFileId != null) {
        this.idCardFontPicFileUrl =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.idCardFontPicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 身份证背面
    cardBackHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData.startDate = res.result.startDate;

      //判断长期+99年
      if (res.result.endDate == "长期") {
        let dateNew = Number(res.result.startDate) + Number(990000);
        this.driverData.endDate = dateNew+"";
      } else {
        this.driverData.endDate = res.result.endDate;
      }

      this.driverData.issue = res.result.issue;
      this.driverData3.workLicenseExpiryTime = this.driverData.endDate;
      this.driverData.workLicenseExpiryTime =
        this.driverData3.workLicenseExpiryTime;
      this.driverData.idCardBackPicFileId = res.result.fileId;
      if (this.driverData.idCardBackPicFileId != null) {
        this.idCardBackPicFileUrl =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.idCardBackPicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },

    //手持身份证
    personalIDSuccess(res, file, fileList) {
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.$Message.success("上传成功");
      }
      this.driverData.holdIdCardFileId = res.result;
      if (res.result != null) {
        this.personalIDCardUrl =
          this.$baseUrl +
          "/freight/file/view/" +
          res.result +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 驾驶员照片
    driverPhotosIdSuccess(res) {
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.$Message.success("上传成功");
      }
      this.driverData.driverPhotosFileId = res.result;
      if (res.result != null) {
        this.driverPhotosId =
          this.$baseUrl +
          "/freight/file/view/" +
          res.result +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 从业资格证
    workLicenesSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData.workLicensePicFileId = res.result.fileId;
      if (this.driverData.workLicensePicFileId != null) {
        this.workLicensePicFileUrl =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.workLicensePicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      } else {
        this.$Message.error(res.message);
      }
    },
    // 诚信考核情况
    workLicenesSuccessSidePage(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData.workBackLicensePicFileId = res.result.fileId;
      if (this.driverData.workBackLicensePicFileId != null) {
        this.workLicensePicFileUrlSidePage =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.workBackLicensePicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      } else {
        this.$Message.error(res.message);
      }
    },
    // 道路经营许可证
    xukezhengHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.$Message.success("上传成功");
      }
      // setInterval(() => {
      //   this.spinShow = false;
      // }, 1000);
      this.driverData.roadOperPermitPicFileId = res.result.fileId;
      if (this.driverData.roadOperPermitPicFileId != null) {
        this.xukezhengPicFileUrl =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.roadOperPermitPicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },

    //驾照主页
    driverFontHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData2.licenseName = res.result.name;
      this.driverData2.licenseNum = res.result.num;
      this.driverData.licenseSex = res.result.sex;
      this.driverData2.driverType = res.result.driverType;
      this.driverData2.licenseStartDate = res.result.startDate;

      if (
        res.result.issuingOrganizations != "" &&
        res.result.issuingOrganizations != "null" &&
        res.result.issuingOrganizations != null
      ) {
        this.driverData2.issuingOrganizations = res.result.issuingOrganizations;
      } else {
        this.driverData2.issuingOrganizations = "";
      }

      //判断长期+99年
      if (res.result.endDate == "长期") {
        let dateNew = Number(res.result.startDate) + Number(990000);
        this.driverData2.licenseEndDate = dateNew+"";
      } else {
        this.driverData2.licenseEndDate = res.result.endDate;
      }

      this.driverData2.issueDate = res.result.issueDate;
      this.driverData.addr = res.result.addr;
      this.driverData.driverFontPicFileID = res.result.fileId;
      if (this.driverData.driverFontPicFileID != null) {
        this.driverFontPicFileUrl =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.driverFontPicFileID +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 驾照副页
    driverBackHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData2.licenseName = res.result.name;
      this.driverData2.licenseNum = res.result.num;
      this.driverData.archiveNo = res.result.archiveNo;
      this.driverData.driverBackPicFileID = res.result.fileId;

      if (this.driverData.driverBackPicFileID != null) {
        this.driverBackPicFileUrl =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.driverBackPicFileID +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    ////////////////////////////////////////////
    // 车主身份证正面
    ownerFontHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData1.ownerName = res.result.name;
      this.driverData1.ownerNum = res.result.num;
      this.driverData.ownerBirth = res.result.birth;
      this.driverData.ownerSex = res.result.sex;
      this.driverData.ownerNationality = res.result.nationality;
      this.driverData.ownerAddress = res.result.address;
      this.driverData.ownerIdCardFontPicFileId = res.result.fileId;
      if (this.driverData.ownerIdCardFontPicFileId != null) {
        this.ownerCardFontPicFileId =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.ownerIdCardFontPicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 车主身份证背面
    ownerBackHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData1.ownerStartDate = res.result.startDate;

      //判断长期+99年
      if (res.result.endDate == "长期") {
        let dateNew = Number(res.result.startDate) + Number(990000);
        this.driverData1.ownerEndDate = dateNew+"";
      } else {
        this.driverData1.ownerEndDate = res.result.endDate;
      }
      this.driverData.ownerIssue = res.result.issue;
      this.driverData.ownerIdCardBackPicFileId = res.result.fileId;
      if (this.driverData.ownerIdCardBackPicFileId != null) {
        this.ownerCardBackPicFileId =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.ownerIdCardBackPicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 车主手持身份证
    ownerBeforsuccess(res, file, fileList) {
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.$Message.success("上传成功");
      }
      this.driverData.ownerHoldIdCardFileId = res.result.fileId;
      if (res.result.fileId != null) {
        this.ownerHandHeldIDCard =
          this.$baseUrl +
          "/freight/file/view/" +
          res.result.fileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    //银行卡
    bankCardideSuccess(res, file, fileList) {
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.$Message.success("上传成功");
      }
      this.driverData.bankFileId = res.result;
      if (res.result != null) {
        this.bankCard =
          this.$baseUrl +
          "/freight/file/view/" +
          res.result +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 车辆挂靠协议
    affiliationSuccess(res) {
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.$Message.success("上传成功");
      }
      this.driverData.affiliatedAgreement = res.result;
      if (res.result != null) {
        this.affiliationAgreement =
          this.$baseUrl +
          "/freight/file/view/" +
          res.result +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },

    // 经营者身份证正面
    frontFontHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      // this.driverData.ownerName = res.result.name;
      this.driverData5.ownerNum = res.result.num;
      this.driverData5.roadPermitNo = res.result.num;
      this.driverData.birth = res.result.birth;
      this.driverData.sex = res.result.sex;
      this.driverData.nationality = res.result.nationality;
      this.driverData.address = res.result.address;
      this.driverData.ownerIdCardFontPicFileId = res.result.fileId;
      if (this.driverData.ownerIdCardFontPicFileId != null) {
        this.frontOperatorIDCard =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.ownerIdCardFontPicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 经营者身份证背面 Back
    frontBackHandleSuccess(res) {
      this.spinShow = true;
      if (res.code == 500) {
        this.$Message.error(res.message);
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        return;
      } else if (res.code == 200) {
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
        this.$Message.success("上传成功");
      }
      this.driverData5.ownerStartDate = res.result.startDate;

      //判断长期+99年
      if (res.result.endDate == "长期") {
        let dateNew = Number(res.result.startDate) + Number(990000);
        this.driverData5.ownerEndDate = dateNew+"";
      } else {
        this.driverData5.ownerEndDate = res.result.endDate;
      }
      this.driverData5.roadPermitNoDate = res.result.endDate;
      this.driverData.ownerIssue = res.result.issue;
      this.driverData.ownerIdCardBackPicFileId = res.result.fileId;
      if (this.driverData.ownerIdCardBackPicFileId != null) {
        this.frontBackPicFileId =
          this.$baseUrl +
          "/freight/file/view/" +
          this.driverData.ownerIdCardBackPicFileId +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 经营者手持身份证
    frontBeforsuccess(res) {
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.$Message.success("上传成功");
      }
      this.driverData.ownerHoldIdCardFileId = res.result;
      if (res.result != null) {
        this.frontHandHeldIDCard =
          this.$baseUrl +
          "/freight/file/view/" +
          res.result +
          "?accessToken=" +
          this.accessToken +
          "&preview=true";
      }
    },
    // 营业执照
    frontbusinessSuccess(res, file, fileList) {
      if (res.code == 500) {
        this.$Message.error(res.message);
        return;
      } else if (res.code == 200) {
        this.driverData5.affiliatedCompanyName = res.result.companyName;
        this.driverData5.affiliatedCompanyCode = res.result.certNo;
        this.driverData5.ownerName = res.result.companyUserName;
        this.$Message.success("上传成功");
        this.frontbusinessLicense = this.imgFormat(res.result.fileId);
        this.driverData.businessLicenseFileId = res.result.fileId;
      }
    },
    // 驾驶员证件信息通过
    adoptDriverCertificateInformation() {
      this.$Modal.confirm({
        title: "确认通过",
        // 记得确认修改此处
        content: "确认通过 " + this.form.name + " 用户的驾驶员认证信息吗？",
        loading: true,
        onOk: () => {
          updateRegistStatus({ userId: this.form.userId, registState: 1 }).then(
            (res) => {
              this.$Modal.remove();
              if (res.success) {
                this.driverVisible = false;
                this.$Message.success("审核通过");
                this.getDataList();
              }
            }
          );
        },
      });
    },
    // 驾驶员证件信息驳回
    repulseDriverCertificateInformation() {
      this.auditFailedModal = true;
      this.AuditFailedInput = "";
      this.confirmRejection =
        "确认拒绝 " + this.form.name + " 用户的驾驶员认证信息吗？";
    },

    // 审核不通过
    auditRejectDetermine() {
      if (this.AuditFailedInput == "") {
        this.$Message.warning("请输入审核不通过原因");
        return false;
      }
      this.loadingbut = true;
      updateRegistStatus({
        userId: this.form.userId,
        registState: 0,
        reason: this.AuditFailedInput,
      }).then((res) => {
        this.loadingbut = false;
        if (res.success) {
          this.driverVisible = false;
          this.auditFailedModal = false;
          this.$Message.success("审核拒绝");
          this.getDataList();
        } else {
          this.$Message.error(res.message);
        }
      });
    },

    // 资格证有效期
    workLicenseEndDate(val) {
      this.driverData3.workLicenseExpiryTime = val;
    },
    // 诚信考核有效期
    workLicenseAssessmentData(val) {
      this.driverData3.sincerityExpiryTime = val;
    },
    roadPermitNoDateDate(val) {
      this.driverData1.roadPermitNoDate = val;
    },
    // 车主/个人
    driverCertification() {
      let drivern1 = false;
      let drivern4 = true;
  
      this.driverData.userId = this.form.userId;
      if (this.customerType == "车主") {
        this.$refs.driverData1.validate((valid) => {
          drivern1 = false;
          if (valid) {
            if (this.bankCard == "") {
              return this.$Message.warning("请上传车主银行卡照片");
            }
            if (this.ownerCardFontPicFileId == "") {
              return this.$Message.warning("请上传车主身份证正面照片");
            }
            if (this.ownerCardBackPicFileId == "") {
              return this.$Message.warning("请上传车主身份证背面照片");
            }
            if (this.affiliationAgreement == "") {
              return this.$Message.warning("请上传车主车辆挂靠协议照片");
            }
            this.driverData.ownerName = this.driverData1.ownerName;
            this.driverData.ownerNum = this.driverData1.ownerNum;
            this.driverData.ownerEndDate = this.driverData1.ownerEndDate;
            this.driverData.contactPhone = this.driverData1.contactPhone;
            this.driverData.cardNumber = this.driverData1.cardNumber;
            this.driverData.phone = this.driverData1.phone;
            this.driverData.roadPermitNo = this.driverData1.roadPermitNo;
            this.driverData.roadPermitNoDate =
              this.driverData1.roadPermitNoDate;
            this.driverData.affiliatedCompanyName =
              this.driverData1.affiliatedCompanyName;
            // ownerDriveCar
            drivern1 = true;
          } else {
            return this.$Message.warning("车主认证填写不完整");
          }
        });
      }

      if (drivern1) {
        if (!this.ownerDriveCar) {
          //  车主不开车
          saveOwnerInfo(this.driverData).then((res) => {
            this.loadinIdcardInfo = false;
            if (res.code == 200) {
              this.$Message.success("车主保存资料成功");
              this.getDataList();
            } else {
              this.$Message.error(res.message);
            }
          });
        } else {
          this.driverCertifications();
        }
      }

      this.$refs.driverData5.validate((valid) => {
        drivern4 = false;
        if (valid) {
          if (this.frontOperatorIDCard == "") {
            return this.$Message.warning("请上传经营者身份证正面");
          }
          if (this.frontBackPicFileId == "") {
            return this.$Message.warning("请上传经营者身份证背面");
          }

          if (this.frontbusinessLicense == "") {
            return this.$Message.warning("请上传营业执照");
          }
          if (this.xukezhengPicFileUrl == "") {
            return this.$Message.warning("请上传挂道路经营许可证");
          }

          this.driverData.ownerEndDate = this.driverData5.ownerEndDate;
          this.driverData.ownerName = this.driverData5.ownerName;
          this.driverData.ownerNum = this.driverData5.ownerNum;
          this.driverData.roadPermitNo = this.driverData5.roadPermitNo;
          this.driverData.roadPermitNoDate = this.driverData5.roadPermitNoDate;

          this.driverData.individualName =
            this.driverData5.affiliatedCompanyName;
          this.driverData.individualCertNo =
            this.driverData5.affiliatedCompanyCode;
          this.driverData.bankName = this.driverData5.cardName;
          this.driverData.bankCode = this.driverData5.cardNumber;

          this.driverData.contactPhone = this.driverData5.contactPhone;
          drivern4 = true;
        } else {
          return this.$Message.warning("个体户信息填写不完整");
        }
      });
      if (drivern4) {
        if (!this.personDriveCar) {
          saveIndividualInfo(this.driverData).then((res) => {
            this.loadinIdcardInfo = false;
            if (res.code == 200) {
              this.$Message.success("个体户保存资料成功");
              this.getDataList();
            } else {
              this.$Message.error(res.message);
            }
          });
        } else {
          this.driverCertifications();
        }
      }
    },
    // 驾驶员
    driverCertifications() {
      console.log(this.driverData2);
      let drivern = false;
      let drivern2 = false;
      let drivern3 = true;

      this.driverData.userId = this.form.userId;
      if (this.idCardFontPicFileUrl == "") {
        return this.$Message.warning("请上传身份证正面");
      }
      if (this.idCardBackPicFileUrl == "") {
        return this.$Message.warning("请上传身份证背面");
      }
      drivern = true;
      this.$refs.driverData2.validate((valid) => {
        drivern2 = false;
        if (valid) {
          if (this.driverFontPicFileUrl == "") {
            return this.$Message.warning("请上传驾照主页");
          } else if (this.driverBackPicFileUrl == "") {
            return this.$Message.warning("请上传驾照副页");
          }
          this.driverData.licenseName = this.driverData2.licenseName;
          this.driverData.licenseNum = this.driverData2.licenseNum;
          this.driverData.driverType = this.driverData2.driverType;
          this.driverData.issueDate = this.driverData2.issueDate;
          this.driverData.yearlyInspectionDate =
            this.driverData2.yearlyInspectionDate;
          this.driverData.licenseStartDate = this.driverData2.licenseStartDate;
          this.driverData.licenseEndDate = this.driverData2.licenseEndDate;
          this.driverData.issuingOrganizations =
            this.driverData2.issuingOrganizations;
          drivern2 = true;
        } else {
          return this.$Message.warning("驾驶证填写不完整");
        }
      });
      this.$refs.driverData3.validate((valid) => {
        drivern3 = false;
        if (valid) {
          drivern3 = true;
          let driverDataDic = {};
          if (this.workLicensePicFileUrl == "") {
          } else {
            driverDataDic.workLicensePicFileId =
              this.driverData.workLicensePicFileId;
          }
          this.driverDataDic.userId = this.form.userId;
          this.driverDataDic.workLicenseExpiryTime =
            this.driverData.workLicenseExpiryTime;
          driverDataDic.workLicenseNo = this.driverData.workLicenseNo;
          this.driverData.sincerityExpiryTime =
            this.driverData3.sincerityExpiryTime;
        } else {
          return this.$Message.warning("从业资格证填写不完整");
        }
      });
 
      if (drivern && drivern2 && drivern3) {
        saveDriverInfo(this.driverData).then((res) => {
          this.loadinIdcardInfo = false;
          if (res.code == 200) {
            this.$Message.success("驾驶员保存资料成功");
            this.getDataList();
          } else {
            this.$Message.error(res.message);
          }
        });
      }
    },
    // 时间去横杠
    timeText(val) {
      let text = "";
      if (val) {
        let arr = val.split("");
        arr.forEach((item) => {
          if (item == "-") {
          } else {
            text += item;
          }
        });
      }
      return text;
    },
    //压缩图片
    beforeUpload(file) {
      return new Promise((resolve, reject) => {
        // console.log("压缩前", file); // 压缩到400KB,大于400KB的图片都会进行压缩，小于则不会
        imageConversion.compressAccurately(file, 100).then((res) => {
          res = new File([res], file.name, {
            type: res.type,
            lastModified: Date.now(),
          });
          resolve(res);
        });
      });
    },
    // 文件格式验证失败时的钩子
    handleFormatError(file) {
      this.$Message.error("图片格式错误,指定上传图片格式 jpg、jpeg、png");
    },
    // 实名认证
    realNameAuthentication() {
      getIdCarDInfo({ userId: this.form.userId }).then((res) => {
        if (res.success) {
          if (res.result.id != null) {
            this.driverData.num = res.result.num;
            this.driverData.name = res.result.name;
            this.driverData.address = res.result.address;
            this.driverData.birth = res.result.birth;
            this.driverData.sex = res.result.sex;
            this.driverData.nationality = res.result.nationality;
            this.driverData.issue = res.result.issue;
            this.driverData.startDate = res.result.startDate;
            this.driverData.end
            
            Date = res.result.endDate;
            if (res.result.idCardFontPicFileId != null) {
              this.driverData.idCardFontPicFileId =
                res.result.idCardFontPicFileId;
              this.idCardFontPicFileUrl = this.imgFormat(
                res.result.idCardFontPicFileId
              );
            }
            if (res.result.idCardBackPicFileId != null) {
              this.driverData.idCardBackPicFileId =
                res.result.idCardBackPicFileId;
              this.idCardBackPicFileUrl = this.imgFormat(
                res.result.idCardBackPicFileId
              );
            }
            // 手持身份证照片ID
            if (res.result.holdIdCardFileId != null) {
              this.driverData.holdIdCardFileId = res.result.holdIdCardFileId;
              this.personalIDCardUrl = this.imgFormat(
                res.result.holdIdCardFileId
              );
            }
            // 驾驶员照片
            if (res.result.driverPhotosFileId != null) {
              this.driverData.driverPhotosFileId =
                res.result.driverPhotosFileId;
              this.driverPhotosId = this.imgFormat(
                res.result.driverPhotosFileId
              );
            }
          }
        } else {
          this.$Message.error(res.message);
        }
      });
    },
    //  驾照认证
    DriverLicenseCertification() {
      getDriverLicenseInfo({ userId: this.form.userId }).then((res) => {
        if (res.success) {
          if (res.result.id != null) {
            this.driverData2.licenseName = res.result.name;
            this.driverData2.licenseNum = res.result.num;
            this.driverData2.driverType = res.result.driverType;
            this.driverData2.issuingOrganizations =
              res.result.issuingOrganizations;
            this.driverData.addr = res.result.addr;
            this.driverData2.licenseSex = res.result.licenseSex;
            this.driverData.archiveNo = res.result.archiveNo;

            this.driverData2.issueDate =
              res.result.issueDate == null
                ? ""
                : res.result.issueDate.replaceAll("-", "");
            this.driverData2.licenseStartDate =
              res.result.startDate == null
                ? ""
                : res.result.startDate.replaceAll("-", "");

            this.driverData2.licenseEndDate =
              res.result.endDate == null
                ? ""
                : res.result.endDate.replaceAll("-", "");
            if (
              res.result.issuingOrganizations != "" &&
              res.result.issuingOrganizations != "null" &&
              res.result.issuingOrganizations != null
            ) {
              this.driverData2.issuingOrganizations =
                res.result.issuingOrganizations;
            } else {
              this.driverData2.issuingOrganizations = "";
            }
            //
            if (res.result.driverFontPicFileID != null) {
              this.driverData.driverFontPicFileID =
                res.result.driverFontPicFileID;

              this.driverFontPicFileUrl = this.imgFormat(
                res.result.driverFontPicFileID
              );
            }

            if (res.result.driverBackPicFileID != null) {
              this.driverData.driverBackPicFileID =
                res.result.driverBackPicFileID;

              this.driverBackPicFileUrl = this.imgFormat(
                res.result.driverBackPicFileID
              );
            }
          }
        } else {
          this.$Message.error(res.message);
        }
        setTimeout(() => {
          this.spinShow = false;
        }, 1000);
      });
    },
    // 从业资格证认证
    qualificationCertification() {
    
    },

    // 车主
    ownerUserInfo() {
      getOwnerUserInfo({ userId: this.form.userId }).then((res) => {
        console.log();
        this.driverData1.affiliatedCompanyName =
          res.result.affiliatedCompanyName;
        this.driverData1.affiliatedCompanyCode =
          res.result.affiliatedCompanyCode;
        this.driverData1.phone = res.result.phone;
        this.driverData1.contactPhone = res.result.contactPhone;
        this.driverData1.cardName = res.result.cardCode;
        // @ApiModelProperty(value = "银行卡号")
        this.driverData1.cardNumber = res.result.cardNumber;
        // @ApiModelProperty(value = "姓名")
        this.driverData1.ownerName = res.result.name;
        this.driverData1.ownerNum = res.result.num;
        this.driverData1.ownerEndDate = res.result.endDate;
        // @ApiModelProperty(value = "道路运输经营许可证号")
        this.driverData1.roadPermitNo = res.result.roadPermitNo;
        // @ApiModelProperty(value = "道路运输经营许可证有效期")
        this.driverData1.roadPermitNoDate = res.result.roadPermitNoDate;

        if (res.result.roadOperPermitPicFileId) {
          this.affiliationAgreementsUrl = this.imgFormat(
            res.result.roadOperPermitPicFileId
          );
          this.driverData.roadOperPermitPicFileId =
            res.result.roadOperPermitPicFileId;
        }
        // 正面
        if (res.result.idCardFontPicFileId != null) {
          this.driverData.ownerIdCardFontPicFileId =
            res.result.idCardFontPicFileId;
          this.ownerCardFontPicFileId = this.imgFormat(
            res.result.idCardFontPicFileId
          );
        }
        // 反面
        if (res.result.idCardBackPicFileId != null) {
          this.driverData.ownerIdCardBackPicFileId =
            res.result.idCardBackPicFileId;
          this.ownerCardBackPicFileId = this.imgFormat(
            res.result.idCardBackPicFileId
          );
        }

        if (res.result.affiliatedAgreement != null) {
          this.driverData.affiliatedAgreement = res.result.affiliatedAgreement;
          this.affiliationAgreement = this.imgFormat(
            res.result.affiliatedAgreement
          );
        }

        // 银行卡
        if (res.result.bankFileId != null) {
          this.driverData.bankFileId = res.result.bankFileId;
          this.bankCard = this.imgFormat(res.result.bankFileId);
        }
        // this.driverData4 = res.result;

        //
      });
    },

    //个体户
    selfEmployedPerson() {
      getIndividualUserInfo({ userId: this.form.userId }).then((res) => {
        this.driverData5.affiliatedCompanyName = res.result.individualName;
        this.driverData5.affiliatedCompanyCode = res.result.individualCertNo;
        // @ApiModelProperty(value = "开户银行")
        this.driverData5.cardName = res.result.bankName;
        // @ApiModelProperty(value = "银行卡号")
        this.driverData5.cardNumber = res.result.bankCode;
        // @ApiModelProperty(value = "姓名")
        this.driverData5.ownerName = res.result.name;
        this.driverData5.ownerNum = res.result.num;
        this.driverData5.ownerEndDate = res.result.endDate;
        // @ApiModelProperty(value = "道路运输经营许可证号")
        this.driverData5.roadPermitNo = res.result.roadPermitNo;
        // @ApiModelProperty(value = "道路运输经营许可证有效期")
        this.driverData5.roadPermitNoDate = res.result.roadPermitNoDate;
        this.driverData5.contactPhone = res.result.contactPhone;
        // 正面
        if (res.result.idCardFontPicFileId != null) {
          this.driverData.ownerIdCardFontPicFileId =
            res.result.idCardFontPicFileId;
          this.frontOperatorIDCard = this.imgFormat(
            res.result.idCardFontPicFileId
          );
        }
        // 反面
        if (res.result.idCardBackPicFileId != null) {
          this.driverData.ownerIdCardBackPicFileId =
            res.result.idCardBackPicFileId;
          this.frontBackPicFileId = this.imgFormat(
            res.result.idCardBackPicFileId
          );
        }
        // 手持身份证照片ID
        if (res.result.holdIdCardFileId != null) {
          this.driverData.ownerHoldIdCardFileId = res.result.holdIdCardFileId;
          this.frontHandHeldIDCard = this.imgFormat(
            res.result.holdIdCardFileId
          );
        }
        // @ApiModelProperty(value = "个体营业执照图片地址")
        if (res.result.businessLicenseFileId != null) {
          this.driverData.businessLicenseFileId =
            res.result.businessLicenseFileId;
          this.frontbusinessLicense = this.imgFormat(
            res.result.businessLicenseFileId
          );
        }
        // @ApiModelProperty(value = "道路经营许可证")
        if (res.result.roadOperPermitPicFileId) {
          this.xukezhengPicFileUrl = this.imgFormat(
            res.result.roadOperPermitPicFileId
          );
          this.driverData.roadOperPermitPicFileId =
            res.result.roadOperPermitPicFileId;
        }
      });
    },
  },
  mounted() {
    this.init();

    if (localStorage.getItem("jurisdictionCargo") == "ROLE_CargOwner") {
      this.columns = this.columns.filter((col) => col.key !== "action");
    } else {
      this.columns = this.columns;
    }
    axios.get(bank_card_type).then((res) => {
      if (res.code == 200) {
        let bank = res.result;
        for (let i = 0; i < bank.length; i++) {
          let obj = {};
          obj.label = bank[i].description;
          obj.value = bank[i].value;
          this.bankCardList.push(obj);
        }
      }
    });
  },
};
</script>
<style lang="less">
// 建议引入通用样式 具体路径自行修改 可删除下面样式代码
// @import "../../../styles/table-common.less";
.popover-Tagdrverr {
  padding-top: 6px;
}
.search {
  .operation {
    margin-bottom: 2vh;
  }
  .select-count {
    font-weight: 600;
    color: #40a9ff;
  }
  .select-clear {
    margin-left: 10px;
  }
  .page {
    margin-top: 2vh;
  }
  .drop-down {
    margin-left: 5px;
  }
}
.demo-upload-list-driver {
  display: inline-block;
  width: 150px;
  height: 90px;
  text-align: center;
  line-height: 60px;
  border: 1px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  margin-right: 4px;
}
.demo-upload-list-driver img {
  width: 148px !important;
  height: 88.2px !important;
}
.demo-upload-list-driver-cover {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
}
.demo-upload-list-driver:hover .demo-upload-list-driver-cover {
  display: block;
}
.demo-upload-list-driver-cover i {
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  margin: 0 2px;
  line-height: 90px;
}
.demo-drawer-footer-drivle {
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  padding: 10px 16px;
  text-align: right;
  background-color: #f5f5f5;
  border: 1px solid #cdcdcd;
}
.check_font {
  font-size: 12px;
  font-weight: 600;
}
.demo-uploadcss-drivre {
  margin-top: -13px;
  width: 150px;
  height: 5px;
}

.check {
  &::before {
    content: "*";
    display: inline-block;
    margin-right: 2px;
    line-height: 1;
    font-family: SimSun;
    font-size: 14px;
    color: #ed4014;
  }
}
.demo-uploadcss-compny {
  margin-top: -13px;
  width: 150px;
  height: 5px;
}
.switchDriver {
  margin-top: 20px;
}
.table table {
  // table-layout: auto;
  width: 100% !important;
}
</style>